Skip to content

Commit c51db1d

Browse files
committed
docs(#2934): snake case config class names
1 parent dc536aa commit c51db1d

24 files changed

+424
-424
lines changed

doc/nvim-tree-lua.txt

Lines changed: 236 additions & 236 deletions
Large diffs are not rendered by default.

lua/nvim-tree.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ local function setup_autocommands(opts)
252252
})
253253
end
254254

255-
---@type nvim_tree.Config
255+
---@type nvim_tree.config
256256
local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
257257
on_attach = "default",
258258
hijack_cursor = false,
@@ -628,7 +628,7 @@ local ACCEPTED_ENUMS = {
628628
},
629629
}
630630

631-
---@param conf? nvim_tree.Config
631+
---@param conf? nvim_tree.config
632632
local function validate_options(conf)
633633
local msg
634634

@@ -733,7 +733,7 @@ function M.purge_all_state()
733733
require("nvim-tree.watcher").purge_watchers()
734734
end
735735

736-
---@param conf? nvim_tree.Config
736+
---@param conf? nvim_tree.config
737737
function M.setup(conf)
738738
if vim.fn.has("nvim-0.9") == 0 then
739739
notify.warn("nvim-tree.lua requires Neovim 0.9 or higher")

lua/nvim-tree/_meta/config.lua

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ error("Cannot require a meta file")
2020
---
2121
---or as a typed variable e.g.
2222
---```lua
23-
--- ---@type nvim_tree.Config
23+
--- ---@type nvim_tree.config
2424
--- local config = {
2525
--- hijack_cursor = true,
2626
--- }
@@ -38,9 +38,9 @@ error("Cannot require a meta file")
3838
---
3939
---{hijack_unnamed_buffer_when_opening} opens in place of the unnamed buffer if it's empty.
4040
---
41-
---{root_dirs} preferred root directories, requires [nvim_tree.Config.UpdateFocusedFile.UpdateRoot].
41+
---{root_dirs} preferred root directories, requires [nvim_tree.config.update_focused_file.update_root].
4242
---
43-
---{prefer_startup_root} prefer startup root directory when updating root directory of the tree. Requires [nvim_tree.Config.UpdateFocusedFile.UpdateRoot].
43+
---{prefer_startup_root} prefer startup root directory when updating root directory of the tree. Requires [nvim_tree.config.update_focused_file.update_root].
4444
---
4545
---{sync_root_with_cwd} changes the tree root directory on [DirChanged] and refreshes the tree.
4646
---
@@ -49,7 +49,7 @@ error("Cannot require a meta file")
4949
---{respect_buf_cwd} changes the [current-directory] of nvim-tree to that of new buffer's when opening nvim-tree.
5050
---
5151
---{select_prompts} uses [vim.ui.select()] style prompts. Necessary when using a UI prompt decorator such as dressing.nvim or telescope-ui-select.nvim
52-
---@class nvim_tree.Config
52+
---@class nvim_tree.config
5353
---
5454
---(default: `default`)
5555
---@field on_attach? "default"|(fun(bufnr: integer))
@@ -87,65 +87,65 @@ error("Cannot require a meta file")
8787
---(default: `false`)
8888
---@field select_prompts? boolean
8989
---
90-
---[nvim_tree.Config.Sort]
91-
---@field sort? nvim_tree.Config.Sort
90+
---[nvim_tree.config.sort]
91+
---@field sort? nvim_tree.config.sort
9292
---
93-
---[nvim_tree.Config.View]
94-
---@field view? nvim_tree.Config.View
93+
---[nvim_tree.config.view]
94+
---@field view? nvim_tree.config.view
9595
---
96-
---[nvim_tree.Config.Renderer]
97-
---@field renderer? nvim_tree.Config.Renderer
96+
---[nvim_tree.config.renderer]
97+
---@field renderer? nvim_tree.config.renderer
9898
---
99-
---[nvim_tree.Config.HijackDirectories]
100-
---@field hijack_directories? nvim_tree.Config.HijackDirectories
99+
---[nvim_tree.config.hijack_directories]
100+
---@field hijack_directories? nvim_tree.config.hijack_directories
101101
---
102-
---[nvim_tree.Config.UpdateFocusedFile]
103-
---@field update_focused_file? nvim_tree.Config.UpdateFocusedFile
102+
---[nvim_tree.config.update_focused_file]
103+
---@field update_focused_file? nvim_tree.config.update_focused_file
104104
---
105-
---[nvim_tree.Config.SystemOpen]
106-
---@field system_open? nvim_tree.Config.SystemOpen
105+
---[nvim_tree.config.system_open]
106+
---@field system_open? nvim_tree.config.system_open
107107
---
108-
---[nvim_tree.Config.Git]
109-
---@field git? nvim_tree.Config.Git
108+
---[nvim_tree.config.git]
109+
---@field git? nvim_tree.config.git
110110
---
111-
---[nvim_tree.Config.Diagnostics]
112-
---@field diagnostics? nvim_tree.Config.Diagnostics
111+
---[nvim_tree.config.diagnostics]
112+
---@field diagnostics? nvim_tree.config.diagnostics
113113
---
114-
---[nvim_tree.Config.Modified]
115-
---@field modified? nvim_tree.Config.Modified
114+
---[nvim_tree.config.modified]
115+
---@field modified? nvim_tree.config.modified
116116
---
117-
---[nvim_tree.Config.Filters]
118-
---@field filters? nvim_tree.Config.Filters
117+
---[nvim_tree.config.filters]
118+
---@field filters? nvim_tree.config.filters
119119
---
120-
---[nvim_tree.Config.LiveFilter]
121-
---@field live_filter? nvim_tree.Config.LiveFilter
120+
---[nvim_tree.config.live_filter]
121+
---@field live_filter? nvim_tree.config.live_filter
122122
---
123-
---[nvim_tree.Config.FilesystemWatchers]
124-
---@field filesystem_watchers? nvim_tree.Config.FilesystemWatchers
123+
---[nvim_tree.config.filesystem_watchers]
124+
---@field filesystem_watchers? nvim_tree.config.filesystem_watchers
125125
---
126-
---[nvim_tree.Config.Actions]
127-
---@field actions? nvim_tree.Config.Actions
126+
---[nvim_tree.config.actions]
127+
---@field actions? nvim_tree.config.actions
128128
---
129-
---[nvim_tree.Config.Trash]
130-
---@field trash? nvim_tree.Config.Trash
129+
---[nvim_tree.config.trash]
130+
---@field trash? nvim_tree.config.trash
131131
---
132-
---[nvim_tree.Config.Tab]
133-
---@field tab? nvim_tree.Config.Tab
132+
---[nvim_tree.config.tab]
133+
---@field tab? nvim_tree.config.tab
134134
---
135-
---[nvim_tree.Config.Bookmarks]
136-
---@field bookmarks? nvim_tree.Config.Bookmarks
135+
---[nvim_tree.config.bookmarks]
136+
---@field bookmarks? nvim_tree.config.bookmarks
137137
---
138-
---[nvim_tree.Config.Notify]
139-
---@field notify? nvim_tree.Config.Notify
138+
---[nvim_tree.config.notify]
139+
---@field notify? nvim_tree.config.notify
140140
---
141-
---[nvim_tree.Config.Help]
142-
---@field help? nvim_tree.Config.Help
141+
---[nvim_tree.config.help]
142+
---@field help? nvim_tree.config.help
143143
---
144-
---[nvim_tree.Config.UI]
145-
---@field ui? nvim_tree.Config.UI
144+
---[nvim_tree.config.ui]
145+
---@field ui? nvim_tree.config.ui
146146
---
147-
---[nvim_tree.Config.Experimental]
148-
---@field experimental? nvim_tree.Config.Experimental
147+
---[nvim_tree.config.experimental]
148+
---@field experimental? nvim_tree.config.experimental
149149
---
150-
---[nvim_tree.Config.Log]
151-
---@field log? nvim_tree.Config.Log
150+
---[nvim_tree.config.log]
151+
---@field log? nvim_tree.config.log

lua/nvim-tree/_meta/config/actions.lua

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ error("Cannot require a meta file")
33

44

55

6-
---@class nvim_tree.Config.Actions
6+
---@class nvim_tree.config.actions
77
---
88
---Use the system clipboard for copy/paste. Copied text will be stored in registers `+` (system), otherwise, it will be stored in `1` and `"`
99
---(default: `true`)
1010
---@field use_system_clipboard? boolean
1111
---
12-
---[nvim_tree.Config.Actions.ChangeDir]
13-
---@field change_dir? nvim_tree.Config.Actions.ChangeDir
12+
---[nvim_tree.config.actions.change_dir]
13+
---@field change_dir? nvim_tree.config.actions.change_dir
1414
---
15-
---[nvim_tree.Config.Actions.ExpandAll]
16-
---@field expand_all? nvim_tree.Config.Actions.ExpandAll
15+
---[nvim_tree.config.actions.expand_all]
16+
---@field expand_all? nvim_tree.config.actions.expand_all
1717
---
18-
---[nvim_tree.Config.Actions.FilePopup]
19-
---@field file_popup? nvim_tree.Config.Actions.FilePopup
18+
---[nvim_tree.config.actions.file_popup]
19+
---@field file_popup? nvim_tree.config.actions.file_popup
2020
---
21-
---[nvim_tree.Config.Actions.OpenFile]
22-
---@field open_file? nvim_tree.Config.Actions.OpenFile
21+
---[nvim_tree.config.actions.open_file]
22+
---@field open_file? nvim_tree.config.actions.open_file
2323
---
24-
---[nvim_tree.Config.Actions.RemoveFile]
25-
---@field remove_file? nvim_tree.Config.Actions.RemoveFile
24+
---[nvim_tree.config.actions.remove_file]
25+
---@field remove_file? nvim_tree.config.actions.remove_file
2626

2727

2828

2929
--- vim [current-directory] behaviour
30-
---@class nvim_tree.Config.Actions.ChangeDir
30+
---@class nvim_tree.config.actions.change_dir
3131
---
3232
---Change the working directory when changing directories in the tree
3333
---(default: `true`)
@@ -44,7 +44,7 @@ error("Cannot require a meta file")
4444

4545

4646
---Configure [nvim-tree-api.tree.expand_all()] and [nvim-tree-api.node.expand()]
47-
---@class nvim_tree.Config.Actions.ExpandAll
47+
---@class nvim_tree.config.actions.expand_all
4848
---
4949
---Limit the number of folders being explored when expanding every folder. Avoids hanging Nvim when running this action on very large folders.
5050
---(default: `300`)
@@ -69,15 +69,15 @@ error("Cannot require a meta file")
6969
---}
7070
---```
7171
---You shouldn't define {width} and {height} values here. They will be overridden to fit the file_popup content.
72-
---@class nvim_tree.Config.Actions.FilePopup
72+
---@class nvim_tree.config.actions.file_popup
7373
---
7474
---(default: `{ col = 1, row = 1, relative = "cursor", border = "shadow", style = "minimal", }`)
7575
---@field open_win_config? vim.api.keyset.win_config
7676

7777

7878

7979
---Opening files.
80-
---@class nvim_tree.Config.Actions.OpenFile
80+
---@class nvim_tree.config.actions.open_file
8181
---
8282
---Closes the explorer when opening a file
8383
---(default: `false`)
@@ -91,8 +91,8 @@ error("Cannot require a meta file")
9191
---(default: `true`)
9292
---@field resize_window? boolean
9393
---
94-
---[nvim_tree.Config.Actions.OpenFile.WindowPicker]
95-
---@field window_picker? nvim_tree.Config.Actions.OpenFile.WindowPicker
94+
---[nvim_tree.config.actions.open_file.window_picker]
95+
---@field window_picker? nvim_tree.config.actions.open_file.window_picker
9696

9797

9898

@@ -102,7 +102,7 @@ error("Cannot require a meta file")
102102
---
103103
---You may define a {picker} function that should return the window id that will open the node, or `nil` if an invalid window is picked or user cancelled the action. The picker may create a new window.
104104
---
105-
---@class nvim_tree.Config.Actions.OpenFile.WindowPicker
105+
---@class nvim_tree.config.actions.open_file.window_picker
106106
---
107107
---(default: `true`)
108108
---@field enable? boolean
@@ -115,15 +115,15 @@ error("Cannot require a meta file")
115115
---(default: `"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"`)
116116
---@field chars? string
117117
---
118-
---[nvim_tree.Config.Actions.OpenFile.WindowPicker.Exclude]
119-
---@field exclude? nvim_tree.Config.Actions.OpenFile.WindowPicker.Exclude
118+
---[nvim_tree.config.actions.open_file.window_picker.exclude]
119+
---@field exclude? nvim_tree.config.actions.open_file.window_picker.exclude
120120

121121

122122

123123
---Tables of buffer option names mapped to a list of option values. Windows containing matching buffers will not be:
124124
--- - available when using a window picker
125125
--- - selected when not using a window picker
126-
---@class nvim_tree.Config.Actions.OpenFile.WindowPicker.Exclude
126+
---@class nvim_tree.config.actions.open_file.window_picker.exclude
127127
---
128128
---(default: `{ "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame", }`)
129129
---@field filetype? string[]
@@ -133,7 +133,7 @@ error("Cannot require a meta file")
133133

134134

135135
---Removing files.
136-
---@class nvim_tree.Config.Actions.RemoveFile
136+
---@class nvim_tree.config.actions.remove_file
137137
---
138138
---Close any window that displays a file when removing that file from the tree.
139139
---(default: `true`)

lua/nvim-tree/_meta/config/bookmarks.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error("Cannot require a meta file")
77
---- `false` do not persist
88
---- `string` absolute path of your choice
99
---
10-
---@class nvim_tree.Config.Bookmarks
10+
---@class nvim_tree.config.bookmarks
1111
---
1212
---(default: `false`)
1313
---@field persist? boolean|string

lua/nvim-tree/_meta/config/diagnostics.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error("Cannot require a meta file")
77
---
88
---See [nvim-tree-icons-highlighting].
99
---
10-
---@class nvim_tree.Config.Diagnostics
10+
---@class nvim_tree.config.diagnostics
1111
---
1212
---(default: `false`)
1313
---@field enable? boolean
@@ -28,14 +28,14 @@ error("Cannot require a meta file")
2828
---(default: `false`)
2929
---@field diagnostic_opts? boolean
3030
---
31-
---@field severity? nvim_tree.Config.Diagnostics.Severity
31+
---@field severity? nvim_tree.config.diagnostics.severity
3232
---
33-
---@field icons? nvim_tree.Config.Diagnostics.Icons
33+
---@field icons? nvim_tree.config.diagnostics.icons
3434

3535

3636

37-
---[nvim_tree.Config.Diagnostics.Severity]()
38-
---@class nvim_tree.Config.Diagnostics.Severity
37+
---[nvim_tree.config.diagnostics.severity]()
38+
---@class nvim_tree.config.diagnostics.severity
3939
---@inlinedoc
4040
---
4141
---[vim.diagnostic.severity]
@@ -48,8 +48,8 @@ error("Cannot require a meta file")
4848

4949

5050

51-
---[nvim_tree.Config.Diagnostics.Icons]()
52-
---@class nvim_tree.Config.Diagnostics.Icons
51+
---[nvim_tree.config.diagnostics.icons]()
52+
---@class nvim_tree.config.diagnostics.icons
5353
---@inlinedoc
5454
---
5555
---(default: `""` )

lua/nvim-tree/_meta/config/experimental.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error("Cannot require a meta file")
77
---
88
---In the event of a problem please disable the experiment and raise an issue.
99
---
10-
---@class nvim_tree.Config.Experimental
10+
---@class nvim_tree.config.experimental
1111
---
1212
--Example below for future reference:
1313
--

lua/nvim-tree/_meta/config/filesystem_watchers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ error("Cannot require a meta file")
1212
--- - A function that is passed an absolute path and returns `true` to disable
1313
---This may be useful when a path is not in `.gitignore` or git integration is disabled.
1414
---
15-
---@class nvim_tree.Config.FilesystemWatchers
15+
---@class nvim_tree.config.filesystem_watchers
1616
---
1717
---(default: `true`)
1818
---@field enable? boolean

lua/nvim-tree/_meta/config/filters.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error("Cannot require a meta file")
1010
---Filters can be set at startup or toggled live via API with default mappings.
1111
---
1212
---`I `{git_ignored}` `|nvim-tree-api.tree.toggle_gitignore_filter()|
13-
---Ignore files based on `.gitignore`. Requires |nvim_tree.Config.Git|
13+
---Ignore files based on `.gitignore`. Requires |nvim_tree.config.git|
1414
---
1515
---`H `{dotfiles}` `|nvim-tree-api.tree.toggle_hidden_filter()|
1616
---Filter dotfiles: files/directories starting with a `.`
@@ -32,7 +32,7 @@ error("Cannot require a meta file")
3232
---All filters including live filter may be disabled via {enable} and toggled with |nvim-tree-api.tree.toggle_enable_filters()|
3333
---
3434
---Files/directories may be {exclude}d from filtering: they will always be shown, overriding {git_ignored}, {dotfiles} and {custom}.
35-
---@class nvim_tree.Config.Filters
35+
---@class nvim_tree.config.filters
3636
---
3737
---Enable all filters.
3838
---(default: `true`)

lua/nvim-tree/_meta/config/git.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error("Cannot require a meta file")
1313
---
1414
---See [nvim-tree-icons-highlighting].
1515
---
16-
---@class nvim_tree.Config.Git
16+
---@class nvim_tree.config.git
1717
---
1818
---(default: `true`)
1919
---@field enable? boolean

0 commit comments

Comments
 (0)