Skip to content

Commit e5920a0

Browse files
committed
refactor(#3255): define @enum nvim_tree.api.events.Event
1 parent 144994b commit e5920a0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/nvim-tree-lua.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,7 @@ subscribe({event_type}, {callback}) *nvim_tree.api.events.subscribe()*
24202420
Register a handler for an event, see |nvim-tree-events|.
24212421

24222422
Parameters: ~
2423-
• {event_type} (`string`) |nvim_tree_events_kind|
2423+
• {event_type} (`nvim_tree.api.events.Event`) |nvim_tree_events_kind|
24242424
{callback} (`fun(payload: table?)`)
24252425

24262426

lua/nvim-tree/_meta/api/events.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---@meta
22
local nvim_tree = { api = { events = {} } }
33

4+
---@enum nvim_tree.api.events.Event
45
nvim_tree.api.events.Event = {
56
Ready = "Ready",
67
WillRenameNode = "WillRenameNode",
@@ -22,7 +23,7 @@ nvim_tree.api.events.Event = {
2223
---
2324
---Register a handler for an event, see [nvim-tree-events].
2425
---
25-
---@param event_type string [nvim_tree_events_kind]
26+
---@param event_type nvim_tree.api.events.Event [nvim_tree_events_kind]
2627
---@param callback fun(payload: table?)
2728
function nvim_tree.api.events.subscribe(event_type, callback) end
2829

0 commit comments

Comments
 (0)