93 lines
2.7 KiB
Lua
93 lines
2.7 KiB
Lua
return {
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v3.x",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons",
|
|
"MunifTanjim/nui.nvim",
|
|
},
|
|
event = "VeryLazy",
|
|
opts = {
|
|
enable_diagnostics = false,
|
|
enable_git_status = true,
|
|
default_component_configs = {
|
|
icon = {
|
|
folder_empty = "",
|
|
folder_empty_open = "",
|
|
},
|
|
git_status = {
|
|
symbols = {
|
|
-- Change type
|
|
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
|
|
deleted = "✖", -- this can only be used in the git_status source
|
|
renamed = "", -- this can only be used in the git_status source
|
|
-- Status type
|
|
untracked = "",
|
|
ignored = "",
|
|
unstaged = "",
|
|
staged = "",
|
|
conflict = "",
|
|
},
|
|
},
|
|
},
|
|
document_symbols = {
|
|
kinds = {
|
|
File = { icon = "", hl = "Tag" },
|
|
Namespace = { icon = "", hl = "Include" },
|
|
Package = { icon = "", hl = "Label" },
|
|
Class = { icon = "", hl = "Include" },
|
|
Property = { icon = "", hl = "@property" },
|
|
Enum = { icon = "", hl = "@number" },
|
|
Function = { icon = "", hl = "Function" },
|
|
String = { icon = "", hl = "String" },
|
|
Number = { icon = "", hl = "Number" },
|
|
Array = { icon = "", hl = "Type" },
|
|
Object = { icon = "", hl = "Type" },
|
|
Key = { icon = "", hl = "" },
|
|
Struct = { icon = "", hl = "Type" },
|
|
Operator = { icon = "", hl = "Operator" },
|
|
TypeParameter = { icon = "", hl = "Type" },
|
|
StaticMethod = { icon = " ", hl = "Function" },
|
|
},
|
|
},
|
|
git_status = {
|
|
symbols = {
|
|
-- Change type
|
|
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
|
|
deleted = "✖", -- this can only be used in the git_status source
|
|
renamed = "", -- this can only be used in the git_status source
|
|
-- Status type
|
|
untracked = "",
|
|
ignored = "",
|
|
unstaged = "",
|
|
staged = "",
|
|
conflict = "",
|
|
},
|
|
},
|
|
-- Add this section only if you've configured source selector.
|
|
source_selector = {
|
|
sources = {
|
|
{ source = "filesystem", display_name = " Files " },
|
|
{ source = "git_status", display_name = " Git " },
|
|
},
|
|
},
|
|
|
|
event_handlers = {
|
|
{
|
|
event = "neo_tree_buffer_enter",
|
|
handler = function(arg)
|
|
vim.opt.relativenumber = true
|
|
end,
|
|
},
|
|
{
|
|
event = "file_open_requested",
|
|
handler = function()
|
|
require("neo-tree.command").execute({ action = "close" })
|
|
end
|
|
},
|
|
},
|
|
}
|
|
}
|