fix(autocmds): make sure we are using codelens correctly (#2576)

This commit is contained in:
Abouzar Parvan 2022-05-06 14:12:55 +04:30 committed by GitHub
parent be5afb5b77
commit f7ba2c8902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -122,16 +122,11 @@ function M.setup_codelens_refresh(client, bufnr)
if not augroup_exist then
vim.api.nvim_create_augroup("lsp_code_lens_refresh", {})
end
vim.api.nvim_create_autocmd("InsertLeave", {
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, {
group = "lsp_code_lens_refresh",
buffer = bufnr,
callback = vim.lsp.codelens.refresh,
})
vim.api.nvim_create_autocmd("InsertLeave", {
group = "lsp_code_lens_refresh",
buffer = bufnr,
callback = vim.lsp.codelens.display,
})
end
---filter passed to vim.lsp.buf.format