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:
Michael Lingelbach
2021-12-25 11:42:29 -05:00
committed by GitHub
parent 03bd9147f0
commit 857678c2ec
2 changed files with 3 additions and 2 deletions

View File

@@ -489,7 +489,8 @@ local function text_document_did_open_handler(bufnr, client)
-- Protect against a race where the buffer disappears
-- between `did_open_handler` and the scheduled function firing.
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