mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-29 14:28:18 +02:00
fix(autocmds): make sure we are using codelens correctly (#2576)
This commit is contained in:
parent
be5afb5b77
commit
f7ba2c8902
2 changed files with 2 additions and 7 deletions
|
@ -74,7 +74,7 @@ function M.common_on_attach(client, bufnr)
|
||||||
if lvim.lsp.document_highlight then
|
if lvim.lsp.document_highlight then
|
||||||
lu.setup_document_highlight(client, bufnr)
|
lu.setup_document_highlight(client, bufnr)
|
||||||
end
|
end
|
||||||
if lvim.lsp.code_lens_refresh == false then
|
if lvim.lsp.code_lens_refresh then
|
||||||
lu.setup_codelens_refresh(client, bufnr)
|
lu.setup_codelens_refresh(client, bufnr)
|
||||||
end
|
end
|
||||||
add_lsp_buffer_keybindings(bufnr)
|
add_lsp_buffer_keybindings(bufnr)
|
||||||
|
|
|
@ -122,16 +122,11 @@ function M.setup_codelens_refresh(client, bufnr)
|
||||||
if not augroup_exist then
|
if not augroup_exist then
|
||||||
vim.api.nvim_create_augroup("lsp_code_lens_refresh", {})
|
vim.api.nvim_create_augroup("lsp_code_lens_refresh", {})
|
||||||
end
|
end
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, {
|
||||||
group = "lsp_code_lens_refresh",
|
group = "lsp_code_lens_refresh",
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = vim.lsp.codelens.refresh,
|
callback = vim.lsp.codelens.refresh,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
|
||||||
group = "lsp_code_lens_refresh",
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = vim.lsp.codelens.display,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---filter passed to vim.lsp.buf.format
|
---filter passed to vim.lsp.buf.format
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue