Moved more setting into the setup, in line with the changes in NvimTree

navigator
Justin MacCarthy 3 years ago committed by siduck76
parent cb3c5682a8
commit 1cd3faffb3

@ -11,7 +11,6 @@ local g = vim.g
vim.o.termguicolors = true
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
g.nvim_tree_allow_resize = 1
g.nvim_tree_git_hl = git_status
g.nvim_tree_gitignore = git_status
g.nvim_tree_hide_dotfiles = 0
@ -20,9 +19,7 @@ g.nvim_tree_indent_markers = 1
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened
g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" }
g.nvim_tree_side = "left"
g.nvim_tree_width = 25
--
g.nvim_tree_show_icons = {
folders = 1,
-- folder_arrows= 1
@ -55,7 +52,27 @@ g.nvim_tree_icons = {
},
}
g.nvim_tree_bindings = {
require("nvim-tree").setup {
lsp_diagnostics = false,
disable_netrw = true,
hijack_netrw = true,
ignore_ft_on_setup = { "dashboard" },
auto_close = false,
open_on_tab = false,
hijack_cursor = true,
update_cwd = true,
update_focused_file = {
enable = true,
update_cwd = true,
},
view = {
allow_resize = true,
side = 'left',
width = '25',
mappings = {
list = {
{ key = { "<CR>", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" },
{ key = { "<2-RightMouse>", "<C-]>" }, cb = tree_cb "cd" },
{ key = "<C-v>", cb = tree_cb "vsplit" },
@ -87,19 +104,11 @@ g.nvim_tree_bindings = {
{ key = "-", cb = tree_cb "dir_up" },
{ key = "q", cb = tree_cb "close" },
{ key = "g?", cb = tree_cb "toggle_help" },
}
require("nvim-tree").setup {
lsp_diagnostics = false,
disable_netrw = true,
hijack_netrw = true,
ignore_ft_on_setup = { "dashboard" },
auto_close = false,
open_on_tab = false,
hijack_cursor = true,
update_cwd = true,
update_focused_file = {
enable = true,
update_cwd = true,
},
},
},
}

Loading…
Cancel
Save