mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 17:28:50 +02:00
update nvim-tree config
This commit is contained in:
parent
5a53ad9060
commit
028e3d9895
9 changed files with 29 additions and 30 deletions
|
@ -1,23 +1,16 @@
|
|||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
|
||||
if not config_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local tree_cb = nvim_tree_config.nvim_tree_callback
|
||||
local icons = require("user.icons")
|
||||
|
||||
nvim_tree.setup({
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
},
|
||||
select_prompts = true,
|
||||
renderer = {
|
||||
renderer = {
|
||||
root_folder_modifier = ":t",
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
|
@ -63,7 +56,7 @@ nvim_tree.setup({
|
|||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = {
|
||||
|
@ -73,16 +66,9 @@ nvim_tree.setup({
|
|||
error = icons.diagnostics.BoldError,
|
||||
},
|
||||
},
|
||||
view = {
|
||||
view = {
|
||||
width = 30,
|
||||
hide_root_folder = false,
|
||||
side = "left",
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = { "l", "<CR>", "o" }, cb = tree_cb("edit") },
|
||||
{ key = "h", cb = tree_cb("close_node") },
|
||||
{ key = "v", cb = tree_cb("vsplit") },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue