A modern and useful UI plugin that wraps lsp operations.
As neovim is the host system, its plugins should be kept as minimally intrusive as possible
- Code Action(menu and lighthulb)
- Rename
- Hover Document
- Diagnostic
- Peek Definition
For other features of lsp, such as Defination
, References
, implementations
, you use this plugin DNLHC/glance.nvim, it is very good for above
Neovim(stable), but recommend you use Neovim(nightly), now stable not support title_pos
{
"jinzhongjia/LspUI.nvim",
event="Verylazy",
config=function()
require("LspUI").setup()
end
}
use {
"jinzhongjia/LspUI.nvim",
-- event = 'VimEnter',
config=function()
require("LspUI").setup()
end
}
-- Default config
require("LspUI").setup({
lightbulb = {
enable = false, -- close by default
command_enable = false, -- close by default, this switch does not have to be turned on, this command has no effect
icon = "💡",
},
code_action = {
enable = true,
command_enable = true,
icon = "💡",
keybind = {
exec = "<CR>",
prev = "k",
next = "j",
quit = "q",
},
},
hover = {
enable = true,
command_enable = true,
keybind = {
prev = "p",
next = "n",
quit = "q",
},
},
rename = {
enable = true,
command_enable = true,
auto_select = true, -- whether select all automatically
keybind = {
change = "<CR>",
quit = "<ESC>",
},
},
diagnostic = {
enable = true,
command_enable = true,
icons = {
Error = " ",
Warn = " ",
Info = " ",
Hint = " ",
},
},
peek_definition = {
enable = false, -- close by default
command_enable = true,
keybind = {
edit = "op",
vsplit = "ov",
split = "os",
quit = "q",
},
},
})
LspUI hover
LspUI rename
LspUI code_action
LspUI diagnostic next
LspUI diagnostic prev
LspUI peek_definition
- Highly controllable functions
- Least invasive
Code Action:
Rename:
Hover Document:
Diagnostic:
Peek Definition:
- Define(
Defination
andType Definitions
) - Finder(
References
andimplementations
)
- lspsaga.nvim - inspiration