From 85dfa645fc4752a6f12b470ed6225fab868ef711 Mon Sep 17 00:00:00 2001 From: listout Date: Sun, 30 Apr 2023 19:30:02 +0530 Subject: nvim: lau: nvim-tree: using on_attach instead Signed-off-by: listout --- lua/plugins/nvim-tree.lua | 49 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'lua') 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', + [''] = 'close_node', + [''] = 'preview', + [''] = 'close_node', + [''] = 'full_rename', + [''] = 'tabnew', + [''] = '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, + }, }) -- cgit v1.2.3