refactor(lsp): use autocmd api (#19407)

* refactor(lsp): use autocmd api

* refactor(lsp): inline BufWritePost and VimLeavePre callbacks
This commit is contained in:
ii14
2022-07-17 19:13:33 +02:00
committed by GitHub
parent ff35d7a4b9
commit 13abe20b5f
4 changed files with 70 additions and 66 deletions

View File

@@ -221,7 +221,7 @@ describe('vim.lsp.diagnostic', function()
local diags = vim.diagnostic.get(diagnostic_bufnr)
vim.lsp.stop_client(client_id)
vim.lsp._vim_exit_handler()
vim.api.nvim_exec_autocmds('VimLeavePre', { modeline = false })
return diags
]], line)
eq(1, #result)