chore: add type annotations to (almost) all functions
This commit is contained in:
@@ -7,6 +7,8 @@ local M = {
|
||||
uid = 0,
|
||||
}
|
||||
|
||||
---@param path string
|
||||
---@return boolean
|
||||
local function is_git(path)
|
||||
-- If $GIT_DIR is set, consider its value to be equivalent to '.git'.
|
||||
-- Expand $GIT_DIR (and `path`) to a full path (see :help filename-modifiers), since
|
||||
@@ -29,6 +31,8 @@ local IGNORED_PATHS = {
|
||||
"/dev",
|
||||
}
|
||||
|
||||
---@param path string
|
||||
---@return boolean
|
||||
local function is_folder_ignored(path)
|
||||
for _, folder in ipairs(IGNORED_PATHS) do
|
||||
if vim.startswith(path, folder) then
|
||||
@@ -45,6 +49,8 @@ local function is_folder_ignored(path)
|
||||
return false
|
||||
end
|
||||
|
||||
---@param node Node
|
||||
---@return Watcher|nil
|
||||
function M.create_watcher(node)
|
||||
if not M.config.filesystem_watchers.enable or type(node) ~= "table" then
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user