chore: add type annotations and resolve LSP warnings (#2555)
* chore: add type annotations to (almost) all functions
* stylua
* Add classes for symlink nodes
* Replace deprecated `@vararg`
* Move node classes to `node` module
* Fix `Symlink*` classes
* add vim and libuv runtime for luals, qualify libuv types
* add scripts/luals-check, not quite ready for CI
* additional nil checks for git/init.lua and git/runner.lua
* additional nil checks for nvim-tree.lua
* wrap vim.cmd-as-a-function calls inside functions
* vim.tbl_filter predicate returns booleans
* Revert "add scripts/luals-check, not quite ready for CI"
This reverts commit c70229cad9.
* Add `MinimalNode` class in `marks` module
* Fix various LSP warnings
* stylua
* Fix `Explorer` class, update related annotations and add necessary checks
* Add missing annotations to `live-filter`
* Add temporary aliases for `uv.*` types
* Resolve remaining LSP warnings
* Revert changes not related to internal types
* Minor adjustments
* Update doc comments style
* Minor adjustments (pt. 2)
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -12,6 +12,7 @@ local severity_levels = {
|
||||
Hint = 4,
|
||||
}
|
||||
|
||||
---@return table
|
||||
local function from_nvim_lsp()
|
||||
local buffer_severity = {}
|
||||
|
||||
@@ -36,10 +37,14 @@ local function from_nvim_lsp()
|
||||
return buffer_severity
|
||||
end
|
||||
|
||||
---@param severity integer
|
||||
---@param config table
|
||||
---@return boolean
|
||||
local function is_severity_in_range(severity, config)
|
||||
return config.max <= severity and severity <= config.min
|
||||
end
|
||||
|
||||
---@return table
|
||||
local function from_coc()
|
||||
if vim.g.coc_service_initialized ~= 1 then
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user