From 7d9a7f9547543353d4b2febd2458b34c7254adea Mon Sep 17 00:00:00 2001 From: Natercio Moniz Date: Fri, 21 Mar 2025 15:39:06 +0000 Subject: [PATCH] add diffview pluging and tweaked code actions mapping --- init.lua | 2 +- lua/custom/plugins/diffview.lua | 4 ++++ lua/kickstart/plugins/neo-tree.lua | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/diffview.lua diff --git a/init.lua b/init.lua index ef92b2d..8bf1cac 100644 --- a/init.lua +++ b/init.lua @@ -355,7 +355,7 @@ require('lazy').setup({ -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) + map('ac', vim.lsp.buf.code_action, 'Code [Ac]tion', { 'n', 'x' }) -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. diff --git a/lua/custom/plugins/diffview.lua b/lua/custom/plugins/diffview.lua new file mode 100644 index 0000000..1e08a7d --- /dev/null +++ b/lua/custom/plugins/diffview.lua @@ -0,0 +1,4 @@ +return { + 'sindrets/diffview.nvim', + cmd = { 'DiffviewOpen', 'DiffviewClose', 'DiffviewToggleFiles', 'DiffviewFocusFiles' }, +} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index e34c0b6..af4a753 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -21,6 +21,19 @@ return { ['\\'] = 'close_window', }, }, + filtered_items = { + visible = false, + hide_dotfiles = false, + hide_gitignored = true, + hide_by_name = { + '.git', + '.DS_Store', + }, + never_show = {}, + always_show_by_pattern = { + '.env*', + }, + }, }, buffers = {