mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
refactor(lsp): remove usage of deprecated function (#16787)
(cherry picked from commit bb31d3f21a
)
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:

committed by
GitHub

parent
03bd9147f0
commit
857678c2ec
@@ -489,7 +489,8 @@ local function text_document_did_open_handler(bufnr, client)
|
|||||||
-- Protect against a race where the buffer disappears
|
-- Protect against a race where the buffer disappears
|
||||||
-- between `did_open_handler` and the scheduled function firing.
|
-- between `did_open_handler` and the scheduled function firing.
|
||||||
if vim.api.nvim_buf_is_valid(bufnr) then
|
if vim.api.nvim_buf_is_valid(bufnr) then
|
||||||
vim.lsp.diagnostic.redraw(bufnr, client.id)
|
local namespace = vim.lsp.diagnostic.get_namespace(client.id)
|
||||||
|
vim.diagnostic.show(namespace, bufnr)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@@ -584,7 +584,7 @@ end
|
|||||||
|
|
||||||
--- Redraw diagnostics for the given buffer and client
|
--- Redraw diagnostics for the given buffer and client
|
||||||
---
|
---
|
||||||
---@deprecated Prefer |vim.diagnostic.redraw()|
|
---@deprecated Prefer |vim.diagnostic.show()|
|
||||||
---
|
---
|
||||||
--- This calls the "textDocument/publishDiagnostics" handler manually using
|
--- This calls the "textDocument/publishDiagnostics" handler manually using
|
||||||
--- the cached diagnostics already received from the server. This can be useful
|
--- the cached diagnostics already received from the server. This can be useful
|
||||||
|
Reference in New Issue
Block a user