aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-03-22 10:07:52 -0700
committerGitHub <noreply@github.com>2021-03-22 10:07:52 -0700
commit6fef28da58a217a45d2d6e5b68ecfddd1eb84c29 (patch)
tree6f40eb9de5e499a369d66e5a8ef40ee6d74cdd5e /runtime/lua/vim/lsp.lua
parent070e084a64dd08ff28c826843f0d61ca51837841 (diff)
parent875979ec3f528b01c8acf2cc5eec6c7854a181b9 (diff)
downloadrneovim-6fef28da58a217a45d2d6e5b68ecfddd1eb84c29.tar.gz
rneovim-6fef28da58a217a45d2d6e5b68ecfddd1eb84c29.tar.bz2
rneovim-6fef28da58a217a45d2d6e5b68ecfddd1eb84c29.zip
Merge pull request #14184 from tjdevries/tjdevries/nit_diagnostics
lsp: some small diagnostic fixes
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index f0845bfc80..4c453df3f6 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -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