nvim: lsp: Enable nvim-lightbulb only if code lens is available
This commit is contained in:
parent
0d0480a6b2
commit
1891eef80a
1 changed files with 1 additions and 2 deletions
|
@ -135,6 +135,7 @@ local on_attach = function(client, bufnr)
|
||||||
if client.resolved_capabilities.code_lens then
|
if client.resolved_capabilities.code_lens then
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>l", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>l", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
||||||
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]]
|
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]]
|
||||||
|
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI <buffer> lua require'nvim-lightbulb'.update_lightbulb()]]
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.resolved_capabilities.document_highlight then
|
if client.resolved_capabilities.document_highlight then
|
||||||
|
@ -170,8 +171,6 @@ local on_attach = function(client, bufnr)
|
||||||
'璉'; -- operator
|
'璉'; -- operator
|
||||||
' '; -- type parameter
|
' '; -- type parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.cmd [[autocmd CursorHold,CursorHoldI <buffer> lua require'nvim-lightbulb'.update_lightbulb()]]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
Loading…
Reference in a new issue