Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions doc/nvim-tree-lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ All commands execute public API.
keep_buffers = true
})
<
*:NvimTreeHiTest* |nvim_tree.api.health.hi_test()| >lua
*:NvimTreeHiTest* |nvim_tree.api.appearance.hi_test()| >lua

require("nvim-tree.api").health.hi_test()
require("nvim-tree.api").appearance.hi_test()
<
*:NvimTreeResize* |nvim_tree.api.tree.resize()| >lua

Expand Down Expand Up @@ -903,7 +903,7 @@ Deprecated API with unchanged function signature:
`api.config.mappings.get_keymap_default` |nvim_tree.api.map.keymap.default()|
`api.config.mappings.default_on_attach` |nvim_tree.api.map.on_attach.default()|

`api.diagnostics.hi_test` |nvim_tree.api.health.hi_test()|
`api.diagnostics.hi_test` |nvim_tree.api.appearance.hi_test()|

`api.live_filter.start` |nvim_tree.api.filter.live.start()|
`api.live_filter.clear` |nvim_tree.api.filter.live.clear()|
Expand Down Expand Up @@ -2287,12 +2287,12 @@ Please do not require or use modules other than `nvim-tree.api`, as internal
modules will change without notice.

The API is separated into multiple modules:
• |nvim-tree-api-appearance|
• |nvim-tree-api-commands|
• |nvim-tree-api-events|
• |nvim-tree-api-filter|
• |nvim-tree-api-fs|
• |nvim-tree-api-git|
• |nvim-tree-api-health|
• |nvim-tree-api-map|
• |nvim-tree-api-marks|
• |nvim-tree-api-node|
Expand Down Expand Up @@ -2354,6 +2354,16 @@ e.g. the following are functionally identical: >lua



==============================================================================
API: appearance *nvim-tree-api-appearance*

hi_test() *nvim_tree.api.appearance.hi_test()*
Open a new buffer displaying all nvim-tree highlight groups, their link
chain and concrete definition.

Similar to `:so $VIMRUNTIME/syntax/hitest.vim` as per |:highlight|


==============================================================================
API: commands *nvim-tree-api-commands*

Expand Down Expand Up @@ -2530,16 +2540,6 @@ reload() *nvim_tree.api.git.reload()*
Update the git status of the entire tree.


==============================================================================
API: health *nvim-tree-api-health*

hi_test() *nvim_tree.api.health.hi_test()*
Open a new buffer displaying all nvim-tree highlight groups, their link
chain and concrete definition.

Similar to `:so $VIMRUNTIME/syntax/hitest.vim` as per |:highlight|


==============================================================================
API: map *nvim-tree-api-map*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---@meta
local nvim_tree = { api = { health = {} } }
local nvim_tree = { api = { appearance = {} } }

---
---Open a new buffer displaying all nvim-tree highlight groups, their link chain and concrete definition.
---
---Similar to `:so $VIMRUNTIME/syntax/hitest.vim` as per |:highlight|
---
function nvim_tree.api.health.hi_test() end
function nvim_tree.api.appearance.hi_test() end

return nvim_tree.api.health
return nvim_tree.api.appearance
2 changes: 1 addition & 1 deletion lua/nvim-tree/_meta/api/deprecated.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function nvim_tree.api.live_filter.clear() end

nvim_tree.api.diagnostics = {}

---@deprecated use `nvim_tree.api.health.hi_test()`
---@deprecated use `nvim_tree.api.appearance.hi_test()`
function nvim_tree.api.diagnostics.hi_test() end

nvim_tree.api.decorator = {}
Expand Down
4 changes: 2 additions & 2 deletions lua/nvim-tree/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
---
---The API is separated into multiple modules:
---
---- [nvim-tree-api-appearance]
---- [nvim-tree-api-commands]
---- [nvim-tree-api-events]
---- [nvim-tree-api-filter]
---- [nvim-tree-api-fs]
---- [nvim-tree-api-git]
---- [nvim-tree-api-health]
---- [nvim-tree-api-map]
---- [nvim-tree-api-marks]
---- [nvim-tree-api-node]
Expand Down Expand Up @@ -75,12 +75,12 @@
---@class nvim_tree.api
---@nodoc
local api = {
appearance = require("nvim-tree._meta.api.appearance"),
commands = require("nvim-tree._meta.api.commands"),
events = require("nvim-tree._meta.api.events"),
filter = require("nvim-tree._meta.api.filter"),
fs = require("nvim-tree._meta.api.fs"),
git = require("nvim-tree._meta.api.git"),
health = require("nvim-tree._meta.api.health"),
map = require("nvim-tree._meta.api.map"),
marks = require("nvim-tree._meta.api.marks"),
node = require("nvim-tree._meta.api.node"),
Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/api/impl/pre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function M.hydrate(api)
api.map.keymap.default = keymap.get_keymap_default

-- lazy functions
api.health.hi_test = function() require("nvim-tree.appearance.hi-test")() end
api.appearance.hi_test = function() require("nvim-tree.appearance.hi-test")() end

-- classes
api.Decorator = Decorator:extend()
Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ local CMDS = {
desc = "nvim-tree: highlight test",
},
command = function()
require("nvim-tree.api").health.hi_test()
require("nvim-tree.api").appearance.hi_test()
end,
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/legacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function M.map_api(api)
api.tree.toggle_no_bookmark_filter = api.filter.no_bookmark.toggle

api.diagnostics = api.diagnostics or {}
api.diagnostics.hi_test = api.health.hi_test
api.diagnostics.hi_test = api.appearance.hi_test

api.decorator.UserDecorator = api.Decorator
end
Expand Down
27 changes: 13 additions & 14 deletions scripts/vimdoc_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,19 @@ local srcs_config = {

---@type Src[]
local srcs_api = {
{ helptag = "nvim-tree-api", section = "API", path = base .. "api.lua", },

{ helptag = "nvim-tree-api-commands", section = "API: commands", path = base .. "_meta/api/commands.lua", },
{ helptag = "nvim-tree-api-events", section = "API: events", path = base .. "_meta/api/events.lua", },
{ helptag = "nvim-tree-api-filter", section = "API: filter", path = base .. "_meta/api/filter.lua", },
{ helptag = "nvim-tree-api-fs", section = "API: fs", path = base .. "_meta/api/fs.lua", },
{ helptag = "nvim-tree-api-git", section = "API: git", path = base .. "_meta/api/git.lua", },
{ helptag = "nvim-tree-api-health", section = "API: health", path = base .. "_meta/api/health.lua", },
{ helptag = "nvim-tree-api-map", section = "API: map", path = base .. "_meta/api/map.lua", },
{ helptag = "nvim-tree-api-marks", section = "API: marks", path = base .. "_meta/api/marks.lua", },
{ helptag = "nvim-tree-api-node", section = "API: node", path = base .. "_meta/api/node.lua", },
{ helptag = "nvim-tree-api-tree", section = "API: tree", path = base .. "_meta/api/tree.lua", },

{ helptag = "nvim-tree-class", section = "PLACEHOLDER", path = placeholder, },
{ helptag = "nvim-tree-api", section = "API", path = base .. "api.lua", },
{ helptag = "nvim-tree-api-appearance", section = "API: appearance", path = base .. "_meta/api/appearance.lua", },
{ helptag = "nvim-tree-api-commands", section = "API: commands", path = base .. "_meta/api/commands.lua", },
{ helptag = "nvim-tree-api-events", section = "API: events", path = base .. "_meta/api/events.lua", },
{ helptag = "nvim-tree-api-filter", section = "API: filter", path = base .. "_meta/api/filter.lua", },
{ helptag = "nvim-tree-api-fs", section = "API: fs", path = base .. "_meta/api/fs.lua", },
{ helptag = "nvim-tree-api-git", section = "API: git", path = base .. "_meta/api/git.lua", },
{ helptag = "nvim-tree-api-map", section = "API: map", path = base .. "_meta/api/map.lua", },
{ helptag = "nvim-tree-api-marks", section = "API: marks", path = base .. "_meta/api/marks.lua", },
{ helptag = "nvim-tree-api-node", section = "API: node", path = base .. "_meta/api/node.lua", },
{ helptag = "nvim-tree-api-tree", section = "API: tree", path = base .. "_meta/api/tree.lua", },

{ helptag = "nvim-tree-class", section = "PLACEHOLDER", path = placeholder, },
}

---@type Src[]
Expand Down
Loading