fix: resolve all remaining LuaLS diagnostics

This commit is contained in:
Lewis Russell
2025-01-24 13:01:25 +00:00
committed by Lewis Russell
parent 83479b95ab
commit 6aa42e8f92
41 changed files with 177 additions and 104 deletions

View File

@@ -20,7 +20,7 @@ end
---@return lsp.DiagnosticSeverity
local function severity_vim_to_lsp(severity)
if type(severity) == 'string' then
severity = vim.diagnostic.severity[severity]
severity = vim.diagnostic.severity[severity] --- @type integer
end
return severity
end
@@ -89,6 +89,7 @@ local function diagnostic_lsp_to_vim(diagnostics, bufnr, client_id)
string.format('Unsupported Markup message from LSP client %d', client_id),
vim.lsp.log_levels.ERROR
)
--- @diagnostic disable-next-line: undefined-field,no-unknown
message = diagnostic.message.value
end
local line = buf_lines and buf_lines[start.line + 1] or ''