chore: add type annotations to (almost) all functions
This commit is contained in:
@@ -6,6 +6,7 @@ local Iterator = require "nvim-tree.iterators.node-iterator"
|
||||
|
||||
local M = {}
|
||||
|
||||
---@return fun(path: string): boolean
|
||||
local function buf_match()
|
||||
local buffer_paths = vim.tbl_map(function(buffer)
|
||||
return vim.api.nvim_buf_get_name(buffer)
|
||||
@@ -22,6 +23,7 @@ local function buf_match()
|
||||
end
|
||||
end
|
||||
|
||||
---@param keep_buffers boolean
|
||||
function M.fn(keep_buffers)
|
||||
local node = lib.get_node_at_cursor()
|
||||
local explorer = core.get_explorer()
|
||||
|
||||
@@ -57,6 +57,7 @@ local function gen_iterator()
|
||||
end
|
||||
end
|
||||
|
||||
---@param base_node table
|
||||
function M.fn(base_node)
|
||||
local node = base_node.nodes and base_node or core.get_explorer()
|
||||
if gen_iterator()(node) then
|
||||
|
||||
Reference in New Issue
Block a user