nvim: Add lightbulb for discoverable LSP code actions
This commit is contained in:
parent
b1d3fb01c2
commit
bdc14d4ebc
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', 'gf', ':TSLspFixCurrent<CR>', { silent = true })
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gI', ':TSLspImportAll<CR>', { silent = true })
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gI', ':TSLspImportAll<CR>', { silent = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.cmd [[autocmd CursorHold,CursorHoldI <buffer> lua require'nvim-lightbulb'.update_lightbulb()]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function set_snippet_capabilities()
|
function set_snippet_capabilities()
|
||||||
|
|
|
@ -78,6 +78,7 @@ local init = function ()
|
||||||
use {
|
use {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
'ray-x/lsp_signature.nvim',
|
'ray-x/lsp_signature.nvim',
|
||||||
|
'kosayoda/nvim-lightbulb',
|
||||||
}
|
}
|
||||||
-- Language support & syntax highlighting
|
-- Language support & syntax highlighting
|
||||||
-- Coq
|
-- Coq
|
||||||
|
|
Loading…
Reference in a new issue