mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 06:20:53 +00:00
fix: resolve all remaining LuaLS diagnostics
This commit is contained in:
committed by
Lewis Russell
parent
83479b95ab
commit
6aa42e8f92
@@ -138,7 +138,9 @@ local function lint_match(buf, match, query, lang_context, diagnostics)
|
||||
-- perform language-independent checks only for first lang
|
||||
if lang_context.is_first_lang and cap_id == 'error' then
|
||||
local node_text = vim.treesitter.get_node_text(node, buf):gsub('\n', ' ')
|
||||
add_lint_for_node(diagnostics, { node:range() }, 'Syntax error: ' .. node_text)
|
||||
---@diagnostic disable-next-line: missing-fields LuaLS varargs bug
|
||||
local range = { node:range() } --- @type Range4
|
||||
add_lint_for_node(diagnostics, range, 'Syntax error: ' .. node_text)
|
||||
end
|
||||
|
||||
-- other checks rely on Neovim parser introspection
|
||||
|
||||
Reference in New Issue
Block a user