|
1 | 1 | local config = { |
2 | | - default_source = "filesystem", |
3 | 2 | close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab |
4 | 3 | -- popup_border_style is for input and confirmation dialogs. |
5 | 4 | -- Configurtaion of floating window is done in the individual source sections. |
6 | 5 | -- "NC" is a special style that works well with NormalNC set |
7 | | - popup_border_style = "NC", -- "double", "none", "rounded", "shadow", "single" or "solid" |
8 | | - use_popups_for_input = true, -- If false, inputs will use vim.ui.input() instead of custom floats. |
9 | 6 | close_floats_on_escape_key = true, |
| 7 | + default_source = "filesystem", |
10 | 8 | enable_diagnostics = true, |
11 | 9 | enable_git_status = true, |
12 | 10 | git_status_async = true, |
13 | | - open_files_in_last_window = true, -- false = open files in top left window |
14 | | - sort_case_insensitive = false, -- used when sorting files and directories in the tree |
15 | 11 | log_level = "info", -- "trace", "debug", "info", "warn", "error", "fatal" |
16 | 12 | log_to_file = false, -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file |
| 13 | + open_files_in_last_window = true, -- false = open files in top left window |
| 14 | + popup_border_style = "NC", -- "double", "none", "rounded", "shadow", "single" or "solid" |
| 15 | + sort_case_insensitive = false, -- used when sorting files and directories in the tree |
| 16 | + use_popups_for_input = true, -- If false, inputs will use vim.ui.input() instead of custom floats. |
17 | 17 | -- |
18 | 18 | --event_handlers = { |
19 | 19 | -- { |
@@ -84,63 +84,31 @@ local config = { |
84 | 84 | folder_empty = "ﰊ", |
85 | 85 | default = "*", |
86 | 86 | }, |
| 87 | + modified = { |
| 88 | + symbol = "[+]", |
| 89 | + highlight = "NeoTreeModified", |
| 90 | + }, |
87 | 91 | name = { |
88 | 92 | trailing_slash = false, |
89 | 93 | use_git_status_colors = true, |
90 | 94 | }, |
91 | 95 | git_status = { |
92 | 96 | symbols = { |
93 | 97 | -- Change type |
94 | | - added = "✚", |
| 98 | + added = "✚", -- NOTE: you can set any of these to an empty string to not show them |
95 | 99 | deleted = "✖", |
96 | 100 | modified = "", |
97 | 101 | renamed = "", |
98 | 102 | -- Status type |
99 | 103 | untracked = "", |
100 | 104 | ignored = "", |
101 | | - unstaged = "", -- "", |
102 | | - staged = "", -- "", |
| 105 | + unstaged = "", |
| 106 | + staged = "", |
103 | 107 | conflict = "", |
104 | 108 | }, |
105 | 109 | align = "right", |
106 | 110 | }, |
107 | 111 | }, |
108 | | - window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for |
109 | | - -- possible options. These can also be functions that return these options. |
110 | | - position = "left", -- left, right, float, current |
111 | | - width = 40, -- applies to left and right positions |
112 | | - popup = { -- settings that apply to float position only |
113 | | - size = { |
114 | | - height = "80%", |
115 | | - width = "50%", |
116 | | - }, |
117 | | - position = "50%", -- 50% means center it |
118 | | - -- you can also specify border here, if you want a different setting from |
119 | | - -- the global popup_border_style. |
120 | | - }, |
121 | | - -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. |
122 | | - -- You can also create your own commands by providing a function instead of a string. |
123 | | - mappings = { |
124 | | - ["<space>"] = "toggle_node", |
125 | | - ["<2-LeftMouse>"] = "open", |
126 | | - ["<cr>"] = "open", |
127 | | - ["S"] = "open_split", |
128 | | - ["s"] = "open_vsplit", |
129 | | - ["C"] = "close_node", |
130 | | - ["z"] = "close_all_nodes", |
131 | | - ["R"] = "refresh", |
132 | | - ["a"] = "add", |
133 | | - ["A"] = "add_directory", |
134 | | - ["d"] = "delete", |
135 | | - ["r"] = "rename", |
136 | | - ["y"] = "copy_to_clipboard", |
137 | | - ["x"] = "cut_to_clipboard", |
138 | | - ["p"] = "paste_from_clipboard", |
139 | | - ["c"] = "copy", -- takes text input for destination |
140 | | - ["m"] = "move", -- takes text input for destination |
141 | | - ["q"] = "close_window", |
142 | | - }, |
143 | | - }, |
144 | 112 | renderers = { |
145 | 113 | directory = { |
146 | 114 | { "indent" }, |
@@ -181,14 +149,52 @@ local config = { |
181 | 149 | -- highlight = "NeoTreeSymbolicLinkTarget", |
182 | 150 | -- }, |
183 | 151 | { "clipboard", zindex = 10 }, |
184 | | - --{ "bufnr", zindex = 10 }, |
| 152 | + { "bufnr", zindex = 10 }, |
| 153 | + { "modified", zindex = 20, align = "right" }, |
| 154 | + { "diagnostics", errors_only = true, zindex = 20, align = "right" }, |
185 | 155 | { "diagnostics", zindex = 20, align = "right" }, |
186 | 156 | { "git_status", zindex = 20, align = "right" }, |
187 | 157 | }, |
188 | 158 | }, |
189 | 159 | }, |
190 | 160 | }, |
191 | 161 | nesting_rules = {}, |
| 162 | + window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for |
| 163 | + -- possible options. These can also be functions that return these options. |
| 164 | + position = "left", -- left, right, float, current |
| 165 | + width = 40, -- applies to left and right positions |
| 166 | + popup = { -- settings that apply to float position only |
| 167 | + size = { |
| 168 | + height = "80%", |
| 169 | + width = "50%", |
| 170 | + }, |
| 171 | + position = "50%", -- 50% means center it |
| 172 | + -- you can also specify border here, if you want a different setting from |
| 173 | + -- the global popup_border_style. |
| 174 | + }, |
| 175 | + -- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands. |
| 176 | + -- You can also create your own commands by providing a function instead of a string. |
| 177 | + mappings = { |
| 178 | + ["<space>"] = "toggle_node", |
| 179 | + ["<2-LeftMouse>"] = "open", |
| 180 | + ["<cr>"] = "open", |
| 181 | + ["S"] = "open_split", |
| 182 | + ["s"] = "open_vsplit", |
| 183 | + ["C"] = "close_node", |
| 184 | + ["z"] = "close_all_nodes", |
| 185 | + ["R"] = "refresh", |
| 186 | + ["a"] = "add", |
| 187 | + ["A"] = "add_directory", |
| 188 | + ["d"] = "delete", |
| 189 | + ["r"] = "rename", |
| 190 | + ["y"] = "copy_to_clipboard", |
| 191 | + ["x"] = "cut_to_clipboard", |
| 192 | + ["p"] = "paste_from_clipboard", |
| 193 | + ["c"] = "copy", -- takes text input for destination |
| 194 | + ["m"] = "move", -- takes text input for destination |
| 195 | + ["q"] = "close_window", |
| 196 | + }, |
| 197 | + }, |
192 | 198 | filesystem = { |
193 | 199 | window = { |
194 | 200 | mappings = { |
@@ -224,7 +230,7 @@ local config = { |
224 | 230 | }, |
225 | 231 | find_by_full_path_words = false, -- `false` means it only searches the tail of a path. |
226 | 232 | -- `true` will change the filter into a full path |
227 | | - -- search with space as an implicit ".*", so |
| 233 | + -- search with space as an implicit ".*", so |
228 | 234 | -- `fi init` |
229 | 235 | -- will match: `./sources/filesystem/init.lua |
230 | 236 | --find_command = "fd", -- this is determined automatically, you probably don't need to set it |
|
0 commit comments