From aa415ec76c8206b599a1592674b3c0a5a1e9d348 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 17 Dec 2023 23:23:09 +0100 Subject: [PATCH] Remove nvim-tree --- lua/core/autocommands.lua | 13 ------- lua/core/globals.lua | 3 -- lua/plugins.lua | 7 ---- lua/plugins/tree.lua | 72 --------------------------------------- 4 files changed, 95 deletions(-) delete mode 100644 lua/plugins/tree.lua diff --git a/lua/core/autocommands.lua b/lua/core/autocommands.lua index e65b32f..1df8441 100644 --- a/lua/core/autocommands.lua +++ b/lua/core/autocommands.lua @@ -14,16 +14,3 @@ limitations under the License. ]] -local function open_file_tree() - local ok, mod = pcall(require, "nvim-tree.api") - if ok then - -- get current window id - local win = vim.api.nvim_get_current_win() - -- open NvimTree - mod.tree.open() - -- switch back focus to previous window - vim.api.nvim_set_current_win(win) - end -end - -vim.api.nvim_create_autocmd("VimEnter", { callback = open_file_tree, }) diff --git a/lua/core/globals.lua b/lua/core/globals.lua index 35c4ed5..764bafd 100644 --- a/lua/core/globals.lua +++ b/lua/core/globals.lua @@ -17,6 +17,3 @@ vim.g.mapleader = " " vim.g.vimsyn_embed = "1" vim.cmd.language("en_US.utf-8") --- Fix race condition in nvim-tree -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 diff --git a/lua/plugins.lua b/lua/plugins.lua index 1f23089..5e609bb 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -176,13 +176,6 @@ local plugins = { lazy = true, ft = { "jenkinsfile", "Jenkinsfile", }, }, - { - "kyazdani42/nvim-tree.lua", - config = require("plugins.tree"), - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - }, { "dstein64/vim-startuptime", lazy = true, diff --git a/lua/plugins/tree.lua b/lua/plugins/tree.lua deleted file mode 100644 index d24849e..0000000 --- a/lua/plugins/tree.lua +++ /dev/null @@ -1,72 +0,0 @@ ---[[ - Copyright 2023 Oscar Wallberg - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -]] - --- https://github.com/nvim-tree/nvim-tree.lua - -local function setup() - require("nvim-tree").setup({ - sync_root_with_cwd = true, - view = { - width = 40, - preserve_window_proportions = true, - }, - renderer = { - add_trailing = true, - group_empty = true, - highlight_git = true, - indent_markers = { - enable = true, - }, - icons = { - git_placement = "after", - show = { - folder_arrow = true, - }, - }, - }, - update_focused_file = { - enable = false, - update_root = true, - ignore_list = { - "help", - }, - }, - diagnostics = { - enable = true, - show_on_dirs = false, - }, - actions = { - change_dir = { - enable = false, - }, - open_file = { - resize_window = true, - }, - }, - filters = { - git_ignored = false, - custom = { "^\\.git$", }, - }, - notify = { - threshold = vim.log.levels.WARN, - absolute_path = false, - }, - }) - - vim.keymap.set("n", "tt", require("nvim-tree.api").tree.toggle) -end - -return setup