nvim: disable diagnostic false positives
This commit is contained in:
parent
d925f8ca0d
commit
eddd7452d4
2 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,8 @@ local M = {}
|
||||||
---@param path string: file or directory path.
|
---@param path string: file or directory path.
|
||||||
---@return string|boolean: type if path exists, false otherwise.
|
---@return string|boolean: type if path exists, false otherwise.
|
||||||
M.exists = function(path)
|
M.exists = function(path)
|
||||||
local stat = vim.loop.fs_stat(path)
|
---@diagnostic disable-next-line: undefined-field
|
||||||
|
local stat = vim.uv.fs_stat(path)
|
||||||
return (stat and stat.type) or false
|
return (stat and stat.type) or false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ end
|
||||||
M.execute_lines = function(first, last)
|
M.execute_lines = function(first, last)
|
||||||
first = first or vim.fn.line(".")
|
first = first or vim.fn.line(".")
|
||||||
last = last or first
|
last = last or first
|
||||||
|
---@diagnostic disable-next-line: param-type-mismatch
|
||||||
local code = vim.fn.join(vim.fn.getline(first, last), "\n")
|
local code = vim.fn.join(vim.fn.getline(first, last), "\n")
|
||||||
loadstring(code)()
|
loadstring(code)()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue