nvim: Add lightbulb for discoverable LSP code actions
This commit is contained in:
parent
b1d3fb01c2
commit
bdc14d4ebc
3 changed files with 23 additions and 0 deletions
20
nvim/.config/nvim/after/plugin/nvim-lightbulb.lua
Normal file
20
nvim/.config/nvim/after/plugin/nvim-lightbulb.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
require'nvim-lightbulb'.update_lightbulb {
|
||||
sign = {
|
||||
enabled = true,
|
||||
priority = 10,
|
||||
},
|
||||
float = {
|
||||
enabled = true,
|
||||
text = "💡",
|
||||
win_opts = {},
|
||||
},
|
||||
virtual_text = {
|
||||
enabled = true,
|
||||
text = "💡",
|
||||
},
|
||||
status_text = {
|
||||
enabled = true,
|
||||
text = "💡",
|
||||
text_unavailable = ""
|
||||
}
|
||||
}
|
|
@ -162,6 +162,8 @@ local on_attach = function(client, bufnr)
|
|||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gf', ':TSLspFixCurrent<CR>', { silent = true })
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gI', ':TSLspImportAll<CR>', { silent = true })
|
||||
end
|
||||
|
||||
vim.cmd [[autocmd CursorHold,CursorHoldI <buffer> lua require'nvim-lightbulb'.update_lightbulb()]]
|
||||
end
|
||||
|
||||
function set_snippet_capabilities()
|
||||
|
|
|
@ -78,6 +78,7 @@ local init = function ()
|
|||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
'ray-x/lsp_signature.nvim',
|
||||
'kosayoda/nvim-lightbulb',
|
||||
}
|
||||
-- Language support & syntax highlighting
|
||||
-- Coq
|
||||
|
|
Loading…
Reference in a new issue