-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathneotree.lua
97 lines (95 loc) · 2.1 KB
/
neotree.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
local M = {}
M.config = function()
local tree_icons = require("user.lsp_kind").nvim_tree_icons
require("neo-tree").setup {
popup_border_style = "rounded",
enable_diagnostics = false,
source_selector = {
winbar = true,
separator_active = " ",
statusline = false,
sources = {
{
source = "filesystem",
display_name = " Files ",
},
{
source = "buffers",
display_name = " Buffers ",
},
{
source = "git_status",
display_name = " Git ",
},
},
},
enable_git_status = true,
git_status_async = true,
nesting_rules = {
["dart"] = { "freezed.dart", "g.dart" },
},
default_component_configs = {
indent = {
padding = 0,
with_expanders = false,
},
icon = {
folder_closed = tree_icons.folder.default,
folder_open = tree_icons.folder.open,
folder_empty = tree_icons.folder.empty_open,
},
modified = {
symbol = " ",
},
git_status = {
symbols = tree_icons.git,
},
},
window = {
position = "left",
width = 30,
},
filesystem = {
group_empty_dirs = true,
filtered_items = {
visible = false,
hide_dotfiles = true,
hide_gitignored = false,
hide_by_name = {
".DS_Store",
"thumbs.db",
"node_modules",
"__pycache__",
},
never_show = {
".DS_Store",
},
},
window = {
mappings = {
["h"] = "navigate_up",
["l"] = "open",
},
},
follow_current_file = true,
hijack_netrw_behavior = "open_current",
use_libuv_file_watcher = true,
},
git_status = {
window = {
position = "float",
},
},
event_handlers = {
{
event = "vim_buffer_enter",
handler = function(_)
if vim.bo.filetype == "neo-tree" then
vim.wo.signcolumn = "auto"
end
end,
},
},
}
end
return M