From 0b26f728bdc5a75f2afbf1e25d899ab34844b7f4 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Fri, 8 Apr 2022 13:15:46 +0200 Subject: [PATCH] chore(vim): overwrite nvim-tree setup with custom values --- nvim/plugin-config/tree.lua | 97 ++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/nvim/plugin-config/tree.lua b/nvim/plugin-config/tree.lua index 3a798e9..fbfe86c 100644 --- a/nvim/plugin-config/tree.lua +++ b/nvim/plugin-config/tree.lua @@ -4,7 +4,102 @@ local status, nvim_tree = pcall(require, 'nvim-tree') if (not status) then return end -nvim_tree.setup() +require'nvim-tree'.setup { + auto_reload_on_write = true, + disable_netrw = false, + hide_root_folder = false, + hijack_cursor = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, + ignore_buffer_on_setup = false, + open_on_setup = false, + open_on_setup_file = false, + open_on_tab = false, + sort_by = "name", + update_cwd = false, + view = { + width = 50, + height = 30, + side = "left", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "yes", + mappings = { + custom_only = false, + list = { + -- user mappings go here + }, + }, + }, + hijack_directories = { + enable = true, + auto_open = true, + }, + update_focused_file = { + enable = false, + update_cwd = false, + ignore_list = {}, + }, + ignore_ft_on_setup = {}, + system_open = { + cmd = nil, + args = {}, + }, + diagnostics = { + enable = false, + show_on_dirs = false, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, + filters = { + dotfiles = false, + custom = {}, + exclude = {}, + }, + git = { + enable = true, + ignore = true, + timeout = 400, + }, + actions = { + change_dir = { + enable = true, + global = false, + }, + open_file = { + quit_on_open = false, + resize_window = false, + window_picker = { + enable = true, + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + }, + }, + }, + trash = { + cmd = "trash", + require_confirm = true, + }, + log = { + enable = false, + truncate = false, + types = { + all = false, + config = false, + copy_paste = false, + git = false, + profile = false, + }, + }, +} --- Mappings local opts = { noremap = true, silent = true }