Home

Awesome

signup.nvim

A little (smart maybe) lsp signature helper for neovim.


Neovim Signature Help Plugin

This Neovim plugin provides a signature help feature for LSP (Language Server Protocol) clients. It displays function signatures and parameter information in a floating window as you type in insert mode or move the cursor in normal mode. The plugin also includes a notification system to display messages with different levels of severity (info, warning, error).

ScreenShots (WIP)

Screenshot 1 Screenshot 2 Screenshot 3

Features

Installation

Using lazy.nvim

Add the following to your init.lua:

require("lazy").setup({
  {
    "Dan7h3x/signup.nvim",
    branch = "main",
    config = function()
      require("signup").setup({
        -- Your configuration options here
      })
    end
  }
})

Using Vim-Plug

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

Configuration

The plugin comes with a default configuration, but you can customize it according to your preferences. Here are the available options:

require('signup').setup(
  {
    win = nil,
    buf = nil,
    timer = nil,
    visible = false,
    current_signatures = nil,
    enabled = false,
    normal_mode_active = false,
    config = {
      silent = false,
      number = true,
      icons = {
        parameter = " ",
        method = " ",
        documentation = " ",
      },
      colors = {
        parameter = "#86e1fc",
        method = "#c099ff",
        documentation = "#4fd6be",
      },
      active_parameter_colors = {
        bg = "#86e1fc",
        fg = "#1a1a1a",
      },
      border = "solid",
      winblend = 10,
    }
  }
)

Options

Usage

Toggle Signature Help in Normal Mode

You can toggle the signature help in normal mode using the default keybinding <C-k>. You can customize this keybinding in the setup function:

require('signup').setup({
  toggle_key = "<C-k>", -- Customize the toggle key here
})

Trigger Signature Help in Insert Mode

The signature help is automatically triggered when you move the cursor or change text in insert mode.

Notifications

The plugin includes a notification system to display messages with different levels of severity (info, warning, error). These notifications are displayed in a floating window and automatically disappear after a few seconds.

Highlight Groups

The plugin defines the following highlight groups:

Examples

Customizing Icons and Colors

require('signup').setup({
  icons = {
    parameter = " ",
    method = " ",
    documentation = " ",
  },
  colors = {
    parameter = "#ffa500",
    method = "#8a2be2",
    documentation = "#008000",
  },
})

Disabling Notifications

require('signup').setup({
  silent = true,
})

Contributing

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.

License

This plugin is licensed under the MIT License. See the LICENSE file for more details.