refactoring nvim-tree options

pull/162/head
Briain O'Driscoll 3 years ago
parent 3efda23509
commit 34b6fbaa29

@ -1,25 +1,5 @@
-- following options are the default -- following options are the default
-- each of these are documented in `:help nvim-tree.OPTION_NAME` -- each of these are documented in `:help nvim-tree.OPTION_NAME`
vim.g.nvim_tree_icons = {
default = "",
symlink = "",
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "",
deleted = "",
untracked = "U",
ignored = "",
},
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
},
}
local status_ok, nvim_tree = pcall(require, "nvim-tree") local status_ok, nvim_tree = pcall(require, "nvim-tree")
if not status_ok then if not status_ok then
@ -43,6 +23,46 @@ vim.api.nvim_create_autocmd("BufEnter", {
}) })
nvim_tree.setup { nvim_tree.setup {
renderer = {
icons = {
webdev_colors = true,
git_placement = "before",
padding = " ",
symlink_arrow = "",
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "",
deleted = "",
untracked = "U",
ignored = "",
},
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
},
},
},
highlight_git = true,
root_folder_modifier = ":t",
},
hijack_directories = {
enable = true,
auto_open = true,
},
disable_netrw = true, disable_netrw = true,
hijack_netrw = true, hijack_netrw = true,
open_on_setup = false, open_on_setup = false,
@ -103,21 +123,11 @@ nvim_tree.setup {
}, },
actions = { actions = {
open_file = { open_file = {
resize_window = true,
quit_on_open = true, quit_on_open = true,
window_picker = { window_picker = {
enable = false, enable = false,
}, },
}, },
}, },
-- unknown options as of 22.05
--
-- update_to_buf_dir = {
-- enable = true,
-- auto_open = true,
-- },
-- auto_resize = true,
-- git_hl = 1,
-- root_folder_modifier = ":t",
} }

Loading…
Cancel
Save