mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
lsp: Force re-display of diagnostics when opening a file
This commit is contained in:
parent
070e084a64
commit
880fb0d146
@ -293,6 +293,19 @@ local function text_document_did_open_handler(bufnr, client)
|
||||
}
|
||||
client.notify('textDocument/didOpen', params)
|
||||
util.buf_versions[bufnr] = params.textDocument.version
|
||||
|
||||
-- Next chance we get, we should re-do the diagnostics
|
||||
vim.schedule(function()
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"](
|
||||
nil,
|
||||
"textDocument/publishDiagnostics",
|
||||
{
|
||||
diagnostics = vim.lsp.diagnostic.get(bufnr, client.id),
|
||||
uri = vim.uri_from_bufnr(bufnr),
|
||||
},
|
||||
client.id
|
||||
)
|
||||
end)
|
||||
end
|
||||
|
||||
-- FIXME: DOC: Shouldn't need to use a dummy function
|
||||
|
Loading…
Reference in New Issue
Block a user