From db1ad041ab3ca909c535e264962591e769f78c2b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 26 Sep 2022 13:25:25 +0200 Subject: [PATCH 1/4] update nvim tree config --- lua/setup/nvim-tree.lua | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua index 3295d15..fa7bca7 100644 --- a/lua/setup/nvim-tree.lua +++ b/lua/setup/nvim-tree.lua @@ -1,27 +1,7 @@ -require('nvim-tree').setup({ - auto_close = true, - update_cwd = true, - update_to_buf_dir = { - -- enable the feature - enable = true, - -- allow to open the tree if it was previously closed - auto_open = false, - }, - update_focused_file = { - enable = true, - update_cwd = false, - ignore_list = {}, - }, - diagnostics = { - enable = true, - icons = { - hint = '', - info = '', - warning = '', - error = '', - }, - }, -}) -vim.keymap.set('n', 'tt', 'NvimTreeToggle') -vim.g.nvim_tree_highlight_opened_files = 1 -vim.g.nvim_tree_respect_buf_cwd = 1 +-- disable netrw at the very start of your init.lua (strongly advised) +vim.g.loaded = 1 +vim.g.loaded_netrwPlugin = 1 + +-- empty setup using defaults +require('nvim-tree').setup() +vim.keymap.set('n', '\\', 'NvimTreeToggle') From 518f32d3bb2e32e44f0728a3a919a01e5fd6935a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 12:50:37 +0200 Subject: [PATCH 2/4] code format --- lua/setup/my_command_center.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua index bcdaa85..6a6a0a9 100644 --- a/lua/setup/my_command_center.lua +++ b/lua/setup/my_command_center.lua @@ -6,8 +6,8 @@ local silent_noremap = { noremap = true, silent = true } project_files = function() local opts = {} -- define here if you want to define something - local ok = pcall(require"telescope.builtin".git_files, opts) - if not ok then require"telescope.builtin".find_files(opts) end + local ok = pcall(require "telescope.builtin".git_files, opts) + if not ok then require "telescope.builtin".find_files(opts) end end command_center.add({ @@ -230,8 +230,8 @@ command_center.add({ description = 'Symbols outline', cmd = 'AerialToggle', keybindings = { - { 'n', 's', silent_noremap }, - { 'n', 's', silent_noremap }, + { 'n', 's', silent_noremap }, + { 'n', 's', silent_noremap }, }, }, { @@ -243,7 +243,3 @@ command_center.add({ cmd = 'set guifont=JetBrainsMonoNL\\ NF:h9', }, }) - - - - From 8ea3ed7a7963a452ac5dcb17ea6118e44b70d3d2 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 13:03:50 +0200 Subject: [PATCH 3/4] disable git for neo-tree --- lua/setup/neo-tree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/setup/neo-tree.lua b/lua/setup/neo-tree.lua index bf78d31..309ed03 100644 --- a/lua/setup/neo-tree.lua +++ b/lua/setup/neo-tree.lua @@ -18,6 +18,7 @@ require('neo-tree').setup({ -- you can also specify border here, if you want a different setting from -- the global popup_border_style. }, + enable_git_status = false, -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. -- You can also create your own commands by providing a function instead of a string. mappings = { From 0dfcf42bebf543df571d03c33bcff98f1df1d151 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 15 Oct 2022 13:04:04 +0200 Subject: [PATCH 4/4] fixed deprecated in lsp confiog --- lua/setup/my_lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index e48dd65..e1d297d 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -20,7 +20,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { 'additionalTextEdits', }, } -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) +capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) OpenDiagFloat = function() for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do