From 87ce55295b90fa45c6b88a3764bbe28548cffe87 Mon Sep 17 00:00:00 2001 From: xesc Date: Tue, 18 Jun 2024 20:58:55 +0200 Subject: [PATCH] add nvimtree --- lua/core/settings.lua | 5 +++++ lua/plugin/lspconfig.lua | 10 +++++----- lua/plugin/nvimtree.lua | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 lua/plugin/nvimtree.lua diff --git a/lua/core/settings.lua b/lua/core/settings.lua index 6f6ef50..e923f84 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -56,6 +56,11 @@ vim.api.nvim_set_option("splitright",true) -- disable Netrw-Banner vim.g.netrw_banner = 0 +-- disable Netrw for Filetree Plugin +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + + -- undotree file management vim.opt.swapfile = false vim.opt.backup = false diff --git a/lua/plugin/lspconfig.lua b/lua/plugin/lspconfig.lua index e8e26ce..d91f488 100644 --- a/lua/plugin/lspconfig.lua +++ b/lua/plugin/lspconfig.lua @@ -60,16 +60,16 @@ return { } }, outline = { - win_position = 'left', - win_width = 47, - auto_preview = false, + win_position = 'right', + win_width = 32, + auto_preview = true, }, lightbulb = { enable = false }, ui = { code_action = '', - title = false, + title = true, border = 'rounded', }, rename = { @@ -94,7 +94,7 @@ return { }, }, diagnostic = { - border_follow = false, + border_follow = true, extend_relatedInformation = true, keys = { quit = { '', 'q' }, diff --git a/lua/plugin/nvimtree.lua b/lua/plugin/nvimtree.lua new file mode 100644 index 0000000..ba0a429 --- /dev/null +++ b/lua/plugin/nvimtree.lua @@ -0,0 +1,18 @@ +return { + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + keys = { + { "F", "NvimTreeToggle", desc = "Toggle Filetree" }, + }, + config = function() + require("nvim-tree").setup({ + view = { + width = 42, + }, + }) + end, +}