feat(nvim): update neo-tree to v3 and add nesting rules
This commit is contained in:
parent
b7ba229cf8
commit
00f6d6b3b1
2 changed files with 176 additions and 159 deletions
|
@ -19,7 +19,7 @@ return require('packer').startup(function(use)
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v2.x",
|
branch = "v3.x",
|
||||||
requires = {
|
requires = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended
|
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
|
|
@ -35,7 +35,7 @@ local config = {
|
||||||
icon = {
|
icon = {
|
||||||
folder_closed = "",
|
folder_closed = "",
|
||||||
folder_open = "",
|
folder_open = "",
|
||||||
folder_empty = "ﰊ",
|
folder_empty = "",
|
||||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||||
-- then these will never be used.
|
-- then these will never be used.
|
||||||
default = "*",
|
default = "*",
|
||||||
|
@ -56,11 +56,11 @@ local config = {
|
||||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||||
deleted = "✖",-- this can only be used in the git_status source
|
deleted = "✖",-- this can only be used in the git_status source
|
||||||
renamed = "",-- this can only be used in the git_status source
|
renamed = "",-- this can only be used in the git_status source
|
||||||
-- Status type
|
-- Status type
|
||||||
untracked = "",
|
untracked = "",
|
||||||
ignored = "",
|
ignored = "",
|
||||||
unstaged = "",
|
unstaged = "",
|
||||||
staged = "",
|
staged = "",
|
||||||
conflict = "",
|
conflict = "",
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,24 @@ local config = {
|
||||||
["?"] = "show_help",
|
["?"] = "show_help",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nesting_rules = {},
|
nesting_rules = {
|
||||||
|
["js"] = {
|
||||||
|
pattern = "(.+)%.js$",
|
||||||
|
files = { "%1.js.map", "%1.min.js", "%1.d.ts" },
|
||||||
|
},
|
||||||
|
["css"] = {
|
||||||
|
pattern = "(.+)%.css$",
|
||||||
|
files = { "%1.css.map", "%1.min.css" },
|
||||||
|
},
|
||||||
|
["go"] = {
|
||||||
|
pattern = "(.*)%.go$",
|
||||||
|
files = { "%1_test.go" },
|
||||||
|
},
|
||||||
|
["templ"] = {
|
||||||
|
pattern = "(.*)%.templ$",
|
||||||
|
files = { "%1_templ.go" },
|
||||||
|
},
|
||||||
|
},
|
||||||
filesystem = {
|
filesystem = {
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
visible = false, -- when true, they will just be displayed differently than normal items
|
visible = false, -- when true, they will just be displayed differently than normal items
|
||||||
|
@ -125,7 +142,7 @@ local config = {
|
||||||
--"thumbs.db"
|
--"thumbs.db"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
follow_current_file = false, -- This will find and focus the file in the active buffer every
|
follow_current_file = { enabled = false }, -- This will find and focus the file in the active buffer every
|
||||||
-- time the current file is changed while the tree is open.
|
-- time the current file is changed while the tree is open.
|
||||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||||
|
@ -149,7 +166,7 @@ local config = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buffers = {
|
buffers = {
|
||||||
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
follow_current_file = { enabled = false }, -- This will find and focus the file in the active buffer every
|
||||||
-- time the current file is changed while the tree is open.
|
-- time the current file is changed while the tree is open.
|
||||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||||
show_unloaded = true,
|
show_unloaded = true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue