Skip to content

Commit

Permalink
chore: enable incomplete-signature-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Oct 25, 2024
1 parent fe03da8 commit ea49c0c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lua/nvim-tree/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ local Api = {
}

--- Print error when setup not called.
---@param fn fun(...)
---@return fun(...)
---@param fn fun(...): any
---@return fun(...): any
local function wrap(fn)
return function(...)
if vim.g.NvimTreeSetup == 1 then
Expand All @@ -55,8 +55,8 @@ local function wrap(fn)
end

---Inject the node as the first argument if present otherwise do nothing.
---@param fn fun(node: Node, ...)
---@return fun(node: Node, ...)
---@param fn fun(node: Node, ...): any
---@return fun(node: Node, ...): any
local function wrap_node(fn)
return function(node, ...)
node = node or lib.get_node_at_cursor()
Expand All @@ -67,8 +67,8 @@ local function wrap_node(fn)
end

---Inject the node or nil as the first argument if absent.
---@param fn fun(node: Node, ...)
---@return fun(node: Node, ...)
---@param fn fun(node: Node, ...): any
---@return fun(node: Node, ...): any
local function wrap_node_or_nil(fn)
return function(node, ...)
node = node or lib.get_node_at_cursor()
Expand All @@ -79,7 +79,7 @@ end
---Invoke a method on the singleton explorer.
---Print error when setup not called.
---@param explorer_method string explorer method name
---@return fun(...) : any
---@return fun(...): any
local function wrap_explorer(explorer_method)
return wrap(function(...)
local explorer = core.get_explorer()
Expand All @@ -93,7 +93,7 @@ end
---Print error when setup not called.
---@param explorer_member string explorer member name
---@param member_method string method name to invoke on member
---@return fun(...) : any
---@return fun(...): any
local function wrap_explorer_member(explorer_member, member_method)
return wrap(function(...)
local explorer = core.get_explorer()
Expand Down Expand Up @@ -288,7 +288,7 @@ Api.config.mappings.default_on_attach = keymap.default_on_attach
Api.diagnostics.hi_test = wrap(appearance_diagnostics.hi_test)

Api.commands.get = wrap(function()
require("nvim-tree.commands").get()
return require("nvim-tree.commands").get()
end)

return Api

0 comments on commit ea49c0c

Please sign in to comment.