mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
f15441be4b
commit
aa3b17d04a
@ -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 {{{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user