Skip to content

Commit 9b9263a

Browse files
committed
doc(#2934): split nvim_tree.Config into files, Sort and HijackDirectories populate others placeholder
1 parent 814dd26 commit 9b9263a

22 files changed

Lines changed: 123 additions & 69 deletions

doc/nvim-tree-lua.txt

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,7 +3445,7 @@ highlight group is not, hard linking as follows: >
34453445
|nvim-tree-api.tree.winid()|
34463446

34473447
==============================================================================
3448-
Lua module: nvim_tree *nvim-tree-module*
3448+
Class: Config *nvim-tree-config*
34493449

34503450
*nvim_tree.Config*
34513451

@@ -3780,16 +3780,6 @@ Lua module: nvim_tree *nvim-tree-module*
37803780
alphabetically by keymap) or `"desc"` (sort alphabetically
37813781
by description). Default: `"key"`
37823782

3783-
*nvim_tree.Config.HijackDirectories*
3784-
3785-
Fields: ~
3786-
{enable}? (`boolean`, default: `true`) Hijack directory buffers.
3787-
Disable this option if you use vim-dirvish or
3788-
dirbuf.nvim. If `hijack_netrw` and `disable_netrw` are
3789-
`false`, this feature will be disabled.
3790-
• {auto_open}? (`boolean`, default: `true`) Opens the tree if the tree
3791-
was previously closed.
3792-
37933783
*nvim_tree.Config.LiveFilter*
37943784
Configurations for the live_filtering feature. The live filter allows you
37953785
to filter the tree nodes dynamically, based on regex matching (see
@@ -4121,33 +4111,6 @@ Lua module: nvim_tree *nvim-tree-module*
41214111
{bottom}? (`string`) Default: `""`
41224112
{none}? (`string`) Default: `" "`
41234113

4124-
*nvim_tree.Config.Sort*
4125-
4126-
Fields: ~
4127-
{sorter}? (`nvim_tree.SortOption|fun(nodes: table): nil`)
4128-
Changes how files within the same directory are
4129-
sorted. Can be one of `"name"`, `"case_sensitive"`,
4130-
`"modification_time"`, `"extension"`, `"suffix"`,
4131-
`"filetype"` or a function. `"extension"` uses all
4132-
suffixes e.g. `foo.tar.gz` -> `.tar.gz` `"suffix"`
4133-
uses the last e.g. `.gz` Default: `"name"` Function
4134-
may perform a sort or return a string with one of
4135-
the above methods. It is passed a table of nodes to
4136-
be sorted, each node containing: - `absolute_path`:
4137-
`string` - `executable`: `boolean` - `extension`:
4138-
`string` - `filetype`: `string` - `link_to`:
4139-
`string` - `name`: `string` - `type`: `"directory"`
4140-
| `"file"` | `"link"`
4141-
• {folders_first}? (`boolean`) Sort folders before files. Has no effect
4142-
when |nvim-tree.sort.sorter| is a function. Default:
4143-
`true` @see nvim-tree.sort.sorter
4144-
• {files_first}? (`boolean`) Sort files before folders. Has no effect
4145-
when |nvim-tree.sort.sorter| is a function. If set
4146-
to `true` it overrides
4147-
|nvim-tree.sort.folders_first|. Default: `false`
4148-
@see nvim-tree.sort.sorter @see
4149-
nvim-tree.sort.folders_first
4150-
41514114
*nvim_tree.Config.SystemOpen*
41524115

41534116
Fields: ~
@@ -4298,6 +4261,53 @@ Lua module: nvim_tree *nvim-tree-module*
42984261

42994262

43004263

4264+
==============================================================================
4265+
Class: Config.Sort *nvim-tree-config-sort*
4266+
4267+
*nvim_tree.Config.Sort*
4268+
4269+
Fields: ~
4270+
{sorter}? (`nvim_tree.SortOption|fun(nodes: table): nil`)
4271+
Changes how files within the same directory are
4272+
sorted. Can be one of `"name"`, `"case_sensitive"`,
4273+
`"modification_time"`, `"extension"`, `"suffix"`,
4274+
`"filetype"` or a function. `"extension"` uses all
4275+
suffixes e.g. `foo.tar.gz` -> `.tar.gz` `"suffix"`
4276+
uses the last e.g. `.gz` Default: `"name"` Function
4277+
may perform a sort or return a string with one of
4278+
the above methods. It is passed a table of nodes to
4279+
be sorted, each node containing: - `absolute_path`:
4280+
`string` - `executable`: `boolean` - `extension`:
4281+
`string` - `filetype`: `string` - `link_to`:
4282+
`string` - `name`: `string` - `type`: `"directory"`
4283+
| `"file"` | `"link"`
4284+
• {folders_first}? (`boolean`) Sort folders before files. Has no effect
4285+
when |nvim-tree.sort.sorter| is a function. Default:
4286+
`true` @see nvim-tree.sort.sorter
4287+
• {files_first}? (`boolean`) Sort files before folders. Has no effect
4288+
when |nvim-tree.sort.sorter| is a function. If set
4289+
to `true` it overrides
4290+
|nvim-tree.sort.folders_first|. Default: `false`
4291+
@see nvim-tree.sort.sorter @see
4292+
nvim-tree.sort.folders_first
4293+
4294+
4295+
4296+
==============================================================================
4297+
Class: Config.HijackDirectories *nvim-tree-config-hijack-directories*
4298+
4299+
*nvim_tree.Config.HijackDirectories*
4300+
4301+
Fields: ~
4302+
{enable}? (`boolean`, default: `true`) Hijack directory buffers.
4303+
Disable this option if you use vim-dirvish or
4304+
dirbuf.nvim. If `hijack_netrw` and `disable_netrw` are
4305+
`false`, this feature will be disabled.
4306+
• {auto_open}? (`boolean`, default: `true`) Opens the tree if the tree
4307+
was previously closed.
4308+
4309+
4310+
43014311
==============================================================================
43024312
Lua module: nvim_tree.api *nvim-tree-api*
43034313

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -126,20 +126,6 @@ error("Cannot require a meta file")
126126
---|nvim_tree.Config.Log|
127127
---@field log? nvim_tree.Config.Log
128128

129-
--
130-
-- HijackDirectories
131-
--
132-
133-
---@class nvim_tree.Config.HijackDirectories
134-
---
135-
---Hijack directory buffers. Disable this option if you use vim-dirvish or dirbuf.nvim. If `hijack_netrw` and `disable_netrw` are `false`, this feature will be disabled.
136-
---(default: `true`)
137-
---@field enable? boolean
138-
---
139-
---Opens the tree if the tree was previously closed.
140-
---(default: `true`)
141-
---@field auto_open? boolean
142-
143129
--
144130
-- Renderer
145131
--
@@ -339,15 +325,6 @@ error("Cannot require a meta file")
339325
---@class nvim_tree.Config.Help
340326
---@field sort_by? nvim_tree.HelpSortOption Defines how mappings are sorted in the help window. Can be `"key"` (sort alphabetically by keymap) or `"desc"` (sort alphabetically by description). Default: `"key"`
341327

342-
--
343-
-- Sort
344-
--
345-
346-
---@class nvim_tree.Config.Sort
347-
---@field sorter? nvim_tree.SortOption|fun(nodes: table): nil Changes how files within the same directory are sorted. Can be one of `"name"`, `"case_sensitive"`, `"modification_time"`, `"extension"`, `"suffix"`, `"filetype"` or a function. `"extension"` uses all suffixes e.g. `foo.tar.gz` -> `.tar.gz` `"suffix"` uses the last e.g. `.gz` Default: `"name"` Function may perform a sort or return a string with one of the above methods. It is passed a table of nodes to be sorted, each node containing: - `absolute_path`: `string` - `executable`: `boolean` - `extension`: `string` - `filetype`: `string` - `link_to`: `string` - `name`: `string` - `type`: `"directory"` | `"file"` | `"link"`
348-
---@field folders_first? boolean Sort folders before files. Has no effect when |nvim-tree.sort.sorter| is a function. Default: `true` @see nvim-tree.sort.sorter
349-
---@field files_first? boolean Sort files before folders. Has no effect when |nvim-tree.sort.sorter| is a function. If set to `true` it overrides |nvim-tree.sort.folders_first|. Default: `false` @see nvim-tree.sort.sorter @see nvim-tree.sort.folders_first
350-
351328
--
352329
-- Filters
353330
--
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---@meta
2+
error("Cannot require a meta file")
3+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---@meta
2+
error("Cannot require a meta file")
3+
4+
---@class nvim_tree.Config.HijackDirectories
5+
---
6+
---Hijack directory buffers. Disable this option if you use vim-dirvish or dirbuf.nvim. If `hijack_netrw` and `disable_netrw` are `false`, this feature will be disabled.
7+
---(default: `true`)
8+
---@field enable? boolean
9+
---
10+
---Opens the tree if the tree was previously closed.
11+
---(default: `true`)
12+
---@field auto_open? boolean
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---@meta
2+
error("Cannot require a meta file")

0 commit comments

Comments
 (0)