nvim: Add lightbulb for discoverable LSP code actions

This commit is contained in:
Sanchayan Maity 2021-07-26 18:44:41 +05:30
parent b1d3fb01c2
commit bdc14d4ebc
3 changed files with 23 additions and 0 deletions

View 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 = ""
}
}

View File

@ -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()

View File

@ -78,6 +78,7 @@ local init = function ()
use {
'neovim/nvim-lspconfig',
'ray-x/lsp_signature.nvim',
'kosayoda/nvim-lightbulb',
}
-- Language support & syntax highlighting
-- Coq