plugins.lsp-signature.settings

Options provided to the require('lsp_signature').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  extra_trigger_chars = [
    "("
    ","
  ];
  hint_prefix = {
    above = "↙ ";
    below = "↖ ";
    current = "← ";
  };
  padding = " ";
  shadow_guibg = "#121315";
  toggle_key = "<M-x>";
}

Declared by:

plugins.lsp-signature.settings.always_trigger

Sometime show signature on new line or in middle of parameter can be confusing.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.lsp-signature.settings.auto_close_after

Autoclose signature float win after x seconds, disabled if nil.

Type: null or lua code string

Default: null

Plugin default: "nil"

Declared by:

plugins.lsp-signature.settings.bind

This is mandatory, otherwise border config won’t get registered. If you want to hook lspsaga or other signature handler, please set to false.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp-signature.settings.close_timeout

Close the floating window after ms when last parameter is entered.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 4000

Declared by:

plugins.lsp-signature.settings.debug

Whether to enable debug logging.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.lsp-signature.settings.doc_lines

Will show two lines of comment/doc(if there are more than two lines in the doc, will be truncated).

Set to zero if you DO NOT want any API comments be shown. This setting only take effect in insert mode, it does not affect signature help in normal mode.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 10

Declared by:

plugins.lsp-signature.settings.extra_trigger_chars

Array of of extra characters that will trigger signature completion.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.lsp-signature.settings.fix_pos

If set to true, the floating window will not auto-close until all parameters are entered.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.lsp-signature.settings.floating_window

Show hint in a floating window, set to false for virtual text only mode.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp-signature.settings.floating_window_above_cur_line

Whether to try to place the floating window above the current line when possible.

Note: Will set to true when fully tested, set to false will use whichever side has more space. This setting will be helpful if you do not want the PUM and floating win overlap.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp-signature.settings.floating_window_off_x

Adjust the floating window’s x position.

Type: null or lua function string or signed integer

Default: null

Plugin default: 1

Declared by:

plugins.lsp-signature.settings.floating_window_off_y

Adjust the floating window’s y positin. e.g:

  • -2 move window up 2 lines.
  • 2 move down 2 lines.

Type: null or lua function string or signed integer

Default: null

Plugin default: 0

Declared by:

plugins.lsp-signature.settings.handler_opts

border can be double, rounded, single, shadow, none or a lua table of borders.

Type: null or (attribute set)

Default: null

Plugin default:

{
  border = "rounded";
}

Declared by:

plugins.lsp-signature.settings.hi_parameter

How your parameter will be highlighted.

Type: null or string or raw lua code

Default: null

Plugin default: "LspSignatureActiveParameter"

Declared by:

plugins.lsp-signature.settings.hint_enable

Whether to enable virtual hint.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp-signature.settings.hint_inline

Should the hint be inline(nvim 0.10 only)? False by default.

  • Return true | 'inline' to show hint inline.
  • Return 'eol' to show hint at the end of line.
  • Return false to disable.
  • Return 'right_align' to display hint right aligned in the current line.

Type: null or lua function string

Default: null

Plugin default:

''
  function() return false end
''

Declared by:

plugins.lsp-signature.settings.hint_prefix

Panda for parameter. Note: for the terminal not support emoji, might crash.

Alternatively, you can provide a table with 3 icons.

Type: null or anything

Default: null

Plugin default: "🐼 "

Declared by:

plugins.lsp-signature.settings.hint_scheme

Type: null or string or raw lua code

Default: null

Plugin default: "String"

Declared by:

plugins.lsp-signature.settings.keymaps

Related to move_cursor_key. The keymaps inside floating window with arguments of bufnr. It can be a function that sets keymaps. <M-d> and <M-u> are default keymaps for moving the cursor up and down.

Type: null or (list of (anything or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.lsp-signature.settings.log_path

Log directory for when debug is on. Default is ~/.cache/nvim/lsp_signature.log.

Type: null or string or raw lua code

Default: null

Plugin default:

{
  __raw = ''
    vim.fn.stdpath("cache") .. "/lsp_signature.log"
  '';
}

Declared by:

plugins.lsp-signature.settings.max_height

Maximum height of the signature floating_window.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 12

Declared by:

plugins.lsp-signature.settings.max_width

Maximum height of the signature floating_window, line will be wrapped if it exceeds max_width.

Type: null or positive integer, meaning >0, or raw lua code

Default: null

Plugin default: 80

Declared by:

plugins.lsp-signature.settings.move_cursor_key

imap, use nvim_set_current_win to move cursor between current window and floating window. Once moved to floating window, you can use <M-d>, <M-u> to move cursor up and down.

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.lsp-signature.settings.padding

Character to pad on left and right of signature.

Type: null or string or raw lua code

Default: null

Plugin default: ""

Declared by:

plugins.lsp-signature.settings.select_signature_key

The keybind for cycling to next signature.

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.lsp-signature.settings.shadow_blend

If you’re using shadow as border, use this to set the opacity.

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 36

Declared by:

plugins.lsp-signature.settings.shadow_guibg

If you’re using shadow as border, use this to set the color.

Type: null or string or raw lua code

Default: null

Plugin default: "Green"

Declared by:

plugins.lsp-signature.settings.time_interval

Timer check interval. Set to a lower value if you want to reduce latency.

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 200

Declared by:

plugins.lsp-signature.settings.toggle_flip_floatwin_setting

  • true: toggle.
  • floating_windows: true|false setting after toggle key pressed.
  • false: floating_window’s setup will not change, toggle_key will pop up signature helper, but signature.

May not popup when typing, depending on floating_window setting.

Type: null or lua code string or boolean

Default: null

Plugin default: false

Declared by:

plugins.lsp-signature.settings.toggle_key

Toggle signature on and off in insert mode.

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.lsp-signature.settings.transparency

Disabled by default, allow floating window transparent value 1~100.

Type: null or lua code string or integer between 1 and 100 (both inclusive)

Default: null

Plugin default: "nil"

Declared by:

plugins.lsp-signature.settings.verbose

Whether to show the debug line number.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.lsp-signature.settings.wrap

Allow doc/signature text wrap inside floating_window, useful if your lsp return/sig is too long.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp-signature.settings.zindex

By default it will be on top of all floating windows. Set to <= 50 to send it to the bottom.

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 200

Declared by: