A modern, customizable Neovim plugin that enhances LSP functionality with beautiful and intuitive user interfaces.
0.11+
{
"jinzhongjia/LspUI.nvim",
branch = "main",
config = function()
require("LspUI").setup({
-- config options go here
})
end
}
use {
"jinzhongjia/LspUI.nvim",
branch = 'main',
config = function()
require("LspUI").setup({
-- config options go here
})
end
}
local LspUI = require("LspUI")
LspUI.setup()
require("LspUI").setup({
-- General settings
prompt = {
border = true,
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
},
-- Code Action configuration
code_action = {
enable = true,
command_enable = true,
gitsigns = false,
extend_gitsigns = false,
ui = {
title = "Code Action",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
},
},
-- Hover configuration
hover = {
enable = true,
command_enable = true,
ui = {
title = "Hover",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
},
},
-- Rename configuration
rename = {
enable = true,
command_enable = true,
auto_save = false,
ui = {
title = "Rename",
border = "rounded",
winblend = 0,
},
keys = {
quit = "<C-c>",
exec = "<CR>",
},
},
-- Diagnostic configuration
diagnostic = {
enable = true,
command_enable = true,
ui = {
title = "Diagnostic",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
},
},
-- Definition configuration
definition = {
enable = true,
command_enable = true,
ui = {
title = "Definition",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Reference configuration
reference = {
enable = true,
command_enable = true,
ui = {
title = "Reference",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Implementation configuration
implementation = {
enable = true,
command_enable = true,
ui = {
title = "Implementation",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Type Definition configuration
type_definition = {
enable = true,
command_enable = true,
ui = {
title = "Type Definition",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Declaration configuration
declaration = {
enable = true,
command_enable = true,
ui = {
title = "Declaration",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Call Hierarchy configuration
call_hierarchy = {
enable = true,
command_enable = true,
ui = {
title = "Call Hierarchy",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
exec = "<CR>",
expand = "o",
jump = "e",
vsplit = "v",
split = "s",
tabe = "t",
},
},
-- Lightbulb configuration
lightbulb = {
enable = true,
command_enable = true,
icon = "💡",
action_kind = {
QuickFix = "🔧",
Refactor = "♻️",
RefactorExtract = "📤",
RefactorInline = "📥",
RefactorRewrite = "✏️",
Source = "📄",
SourceOrganizeImports = "📦",
},
},
-- Inlay Hint configuration
inlay_hint = {
enable = true,
command_enable = true,
},
-- Signature Help configuration
signature = {
enable = true,
command_enable = true,
ui = {
title = "Signature Help",
border = "rounded",
winblend = 0,
},
keys = {
quit = "q",
},
},
})
For more detailed configuration options, see the Configuration Wiki.
LspUI hover
- Open an LSP hover window above cursorLspUI rename
- Rename the symbol below the cursor LspUI code_action
- Open a code action selection promptLspUI definition
- Go to definitionLspUI type_definition
- Go to type definition LspUI declaration
- Go to declarationLspUI reference
- Show all referencesLspUI implementation
- Show all implementationsLspUI diagnostic next
- Go to the next diagnosticLspUI diagnostic prev
- Go to the previous diagnosticLspUI call_hierarchy incoming_calls
- Show incoming callsLspUI call_hierarchy outgoing_calls
- Show outgoing callsLspUI inlay_hint
- Toggle inlay hints on/offLspUI signature
- Show signature helpFor comprehensive documentation including keybindings, API reference, and advanced configuration:
:help LspUI
Or visit the Wiki for additional resources.
-- Basic keybinding setup
vim.keymap.set("n", "K", "<cmd>LspUI hover<CR>")
vim.keymap.set("n", "gr", "<cmd>LspUI reference<CR>")
vim.keymap.set("n", "gd", "<cmd>LspUI definition<CR>")
vim.keymap.set("n", "gt", "<cmd>LspUI type_definition<CR>")
vim.keymap.set("n", "gi", "<cmd>LspUI implementation<CR>")
vim.keymap.set("n", "<leader>rn", "<cmd>LspUI rename<CR>")
vim.keymap.set("n", "<leader>ca", "<cmd>LspUI code_action<CR>")
vim.keymap.set("n", "<leader>ci", "<cmd>LspUI call_hierarchy incoming_calls<CR>")
vim.keymap.set("n", "<leader>co", "<cmd>LspUI call_hierarchy outgoing_calls<CR>")
See the Screenshots Wiki for visual examples of all features.
You can see the current development goals and upcoming features here.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs, feature requests, or suggestions.
This plugin was inspired by and references: