A little (smart maybe) lsp signature helper for neovim.
This Neovim plugin provides a signature help feature for LSP (Language Server Protocol) clients. I can't tell much, just watch the showcases.
- Signature Help: Displays function signatures and parameter information in a floating window with rich
lsp
support. - Toggle Mode: Toggle signature help in normal mode,
dock
mode. - Customizable: Highly customizable with options for icons, colors, and more.
- Integration: Integrates with nvim-treesitter for syntax highlighting.
Using lazy.nvim
Add the following to your init.lua
and use main
branch always:
require("lazy").setup({
{
"Dan7h3x/signup.nvim",
branch = "main",
opts = {
-- Your configuration options here
},
config = function(_,opts)
require("signup").setup(opts)
end
}
})
Add the following to your init.vim
:
Plug "Dan7h3x/signup.nvim"
Then, in your init.lua
:
lua << EOF
require('signup').setup({
-- Your configuration options here
})
EOF
The plugin comes with a default configuration, but you can customize it according to your preferences. Here are the available options:
{
silent = true,
icons = {
parameter = "",
method = "",
documentation = "",
type = "",
default = "",
},
colors = {
parameter = "#86e1fc",
method = "#c099ff",
documentation = "#4fd6be",
default_value = "#a80888",
type = "#f6c177",
},
active_parameter = true, -- enable/disable active_parameter highlighting
active_parameter_colors = {
bg = "#86e1fc",
fg = "#1a1a1a",
},
border = "rounded",
dock_border = "rounded",
winblend = 10,
auto_close = true,
trigger_chars = { "(", ",", ")" },
max_height = 10,
max_width = 40,
floating_window_above_cur_line = true,
debounce_time = 50,
dock_toggle_key = "<Leader>sd",
dock_mode = {
enabled = false,
position = "bottom", -- "bottom", "top", or "middle"
height = 4, -- If > 1: fixed height in lines, if <= 1: percentage of window height (e.g., 0.3 = 30%)
padding = 1, -- Padding from window edges
side = "right", -- "right", "left", or "center"
width_percentage = 40, -- Percentage of editor width (10-90%)
},
}
Contributions are welcome! Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvements.
This plugin is licensed under the MIT License. See the LICENSE file for more details.