summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlistout <listout@protonmail.com>2023-04-30 19:30:02 +0530
committerlistout <listout@protonmail.com>2023-04-30 19:30:02 +0530
commit85dfa645fc4752a6f12b470ed6225fab868ef711 (patch)
treedca11b7b1e844e34eac7f928bf117d8a66ac9312
parent9eb9c5a6d1111a7b09ae58505660182c9a4f15a5 (diff)
nvim: lau: nvim-tree: using on_attach instead
Signed-off-by: listout <listout@protonmail.com>
-rw-r--r--lua/plugins/nvim-tree.lua49
1 files changed, 47 insertions, 2 deletions
diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua
index bf9d7c1..01dfa51 100644
--- a/lua/plugins/nvim-tree.lua
+++ b/lua/plugins/nvim-tree.lua
@@ -5,11 +5,49 @@ vim.g.loaded_netrwPlugin = 1
-- OR setup with some options
require('nvim-tree').setup({
sort_by = "case_sensitive",
+ on_attach = "disable",
view = {
- adaptive_size = true,
+ centralize_selection = false,
+ cursorline = true,
+ debounce_delay = 15,
+ width = 34,
+ hide_root_folder = false,
+ side = "left",
+ preserve_window_proportions = false,
+ number = false,
+ relativenumber = false,
+ signcolumn = "yes",
mappings = {
+ custom_only = false,
list = {
- { key = "u", action = "dir_up" },
+ a = 'create',
+ d = 'remove',
+ l = 'parent_node',
+ L = 'dir_up',
+ K = 'last_sibling',
+ J = 'first_sibling',
+ o = 'system_open',
+ p = 'paste',
+ r = 'rename',
+ R = 'refresh',
+ t = 'next_sibling',
+ T = 'prev_sibling',
+ v = 'next_git_item',
+ V = 'prev_git_item',
+ x = 'cut',
+ yl = 'copy_name',
+ yp = 'copy_path',
+ ya = 'copy_absolute_path',
+ yy = 'copy',
+ [';'] = 'edit',
+ ['.'] = 'toggle_ignored',
+ ['h'] = 'toggle_help',
+ ['<bs>'] = 'close_node',
+ ['<tab>'] = 'preview',
+ ['<s-c>'] = 'close_node',
+ ['<c-r>'] = 'full_rename',
+ ['<c-t>'] = 'tabnew',
+ ['<c-x>'] = 'split',
},
},
},
@@ -20,4 +58,11 @@ require('nvim-tree').setup({
filters = {
dotfiles = true,
},
+ git = {
+ enable = true,
+ ignore = true,
+ show_on_dirs = true,
+ show_on_open_dirs = true,
+ timeout = 400,
+ },
})