lsp: Add <nomodeline> to doautocmd calls (#13576)

When using "au User LspDiagnosticsChanged redrawstatus!", modelines get processed again (see h: doautocmd). Fortunately this can be suppressed using the <nomodeline> flag. this replaces every doautocmd call, that issues a User command, with doautocmd <nomodeline>.
This commit is contained in:
Nils 2020-12-21 20:03:50 +01:00 committed by GitHub
parent f15441be4b
commit aa3b17d04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1063,7 +1063,7 @@ function M.display(diagnostics, bufnr, client_id, config)
M.set_signs(diagnostics, bufnr, client_id, nil, signs_opts)
end
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged")
end
-- }}}
-- Diagnostic User Functions {{{

View File

@ -60,7 +60,7 @@ local function progress_callback(_, _, params, client_id)
table.insert(client.messages, {content = val, show_once = true, shown = 0})
end
vim.api.nvim_command("doautocmd User LspProgressUpdate")
vim.api.nvim_command("doautocmd <nomodeline> User LspProgressUpdate")
end
M['$/progress'] = progress_callback