chore: enable incomplete-signature-doc, format nvt-min.lua, assorted formatting tidies (#2967)

* chore: luacheckrc uses table

* chore: format nvt-min.lua

* chore: complete lua doc

* chore: complete lua doc

* chore: complete lua doc

* chore: complete lua doc

* chore: complete lua doc

* chore: enable incomplete-signature-doc

* chore: enable incomplete-signature-doc

* chore: complete lua doc

* chore: complete lua doc
This commit is contained in:
Alexander Courtis
2024-10-25 14:25:30 +11:00
committed by GitHub
parent 68be6df2fc
commit 077af9f990
17 changed files with 54 additions and 33 deletions

View File

@@ -107,9 +107,11 @@ local function dotfile(self, path)
return self.config.filter_dotfiles and utils.path_basename(path):sub(1, 1) == "."
end
---Bookmark is present
---@param path string
---@param path_type string|nil filetype of path
---@param bookmarks table<string, string|nil> path, filetype table of bookmarked files
---@return boolean
local function bookmark(self, path, path_type, bookmarks)
if not self.config.filter_no_bookmark then
return false

View File

@@ -80,6 +80,7 @@ end
---@param node DirectoryNode
---@param git_status table|nil
---@return Node[]?
function Explorer:reload(node, git_status)
local cwd = node.link_to or node.absolute_path
local handle = vim.loop.fs_scandir(cwd)

View File

@@ -13,6 +13,7 @@ local LiveFilter = {}
---@param opts table
---@param explorer Explorer
---@return LiveFilter
function LiveFilter:new(opts, explorer)
local o = {
explorer = explorer,

View File

@@ -17,7 +17,7 @@ end
--- Predefined comparator, defaulting to name
---@param sorter string as per options
---@return function
---@return fun(a: Node, b: Node): boolean
function Sorter:get_comparator(sorter)
return function(a, b)
return (C[sorter] or C.name)(a, b, self.config)
@@ -41,6 +41,7 @@ end
---Evaluate `sort.folders_first` and `sort.files_first`
---@param a Node
---@param b Node
---@param cfg table
---@return boolean|nil
local function folders_or_files_first(a, b, cfg)
if not (cfg.folders_first or cfg.files_first) then
@@ -164,6 +165,7 @@ end
---@param a Node
---@param b Node
---@param ignorecase boolean|nil
---@param cfg table
---@return boolean
local function node_comparator_name_ignorecase_or_not(a, b, ignorecase, cfg)
if not (a and b) then