mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
refactor(lsp): rename on_publish_diagnostics
parameter #32776
* fix(lsp): rename `on_publish_diagnostics` parameter: result->params * fix(colors): specify local var type to address lint failure
This commit is contained in:
@ -17,7 +17,7 @@ local hi = function(name, val)
|
||||
val.force = true
|
||||
|
||||
-- Make sure that `cterm` attribute is not populated from `gui`
|
||||
val.cterm = val.cterm or {}
|
||||
val.cterm = val.cterm or {} ---@type vim.api.keyset.highlight
|
||||
|
||||
-- Define global highlight
|
||||
vim.api.nvim_set_hl(0, name, val)
|
||||
|
@ -1750,13 +1750,13 @@ on_diagnostic({error}, {result}, {ctx})
|
||||
• {ctx} (`lsp.HandlerContext`)
|
||||
|
||||
*vim.lsp.diagnostic.on_publish_diagnostics()*
|
||||
on_publish_diagnostics({_}, {result}, {ctx})
|
||||
on_publish_diagnostics({_}, {params}, {ctx})
|
||||
|lsp-handler| for the method "textDocument/publishDiagnostics"
|
||||
|
||||
See |vim.diagnostic.config()| for configuration options.
|
||||
|
||||
Parameters: ~
|
||||
• {result} (`lsp.PublishDiagnosticsParams`)
|
||||
• {params} (`lsp.PublishDiagnosticsParams`)
|
||||
• {ctx} (`lsp.HandlerContext`)
|
||||
|
||||
|
||||
|
@ -237,10 +237,10 @@ end
|
||||
--- See |vim.diagnostic.config()| for configuration options.
|
||||
---
|
||||
---@param _ lsp.ResponseError?
|
||||
---@param result lsp.PublishDiagnosticsParams
|
||||
---@param params lsp.PublishDiagnosticsParams
|
||||
---@param ctx lsp.HandlerContext
|
||||
function M.on_publish_diagnostics(_, result, ctx)
|
||||
handle_diagnostics(result.uri, ctx.client_id, result.diagnostics, false)
|
||||
function M.on_publish_diagnostics(_, params, ctx)
|
||||
handle_diagnostics(params.uri, ctx.client_id, params.diagnostics, false)
|
||||
end
|
||||
|
||||
--- |lsp-handler| for the method "textDocument/diagnostic"
|
||||
|
Reference in New Issue
Block a user