nvim_runtime_lua

vim.lsp.util.open_floating_preview.Opts

Fields19

Opts.height : nil | integer

Height of floating window

Opts.width : nil | integer

Width of floating window

Opts.wrap : nil | boolean

Wrap long lines (default: true)

Opts.wrap_at : nil | integer

Character to wrap at for computing height when wrap is enabled

Opts.max_width : nil | integer

Maximal width of floating window

Opts.max_height : nil | integer

Maximal height of floating window

Opts.focus_id : nil | string

If a popup with this id is opened, then focus it

Opts.close_events : nil | table

List of events that closes the floating window

Opts.focusable : nil | boolean

Make float focusable. (default: true)

Opts.focus : nil | boolean

If true, and if {focusable} is also true, focus an existing floating window with the same {focus_id} (default: true)

Opts.offset_x : nil | integer

offset to add to col

Opts.offset_y : nil | integer

offset to add to row

Opts.border : string | string | (string, string)[] | nil

override border

Opts.zindex : nil | integer

override zindex, defaults to 50

Opts.title : string | (string, string)[] | nil
Opts.title_pos : "left" | "center" | "right" | nil
Opts.relative : "mouse" | "cursor" | "editor" | nil

(default: 'cursor')

Opts.anchor_bias : "auto" | "above" | "below" | nil

Adjusts placement relative to cursor.

  • "auto": place window based on which side of the cursor has more lines
  • "above": place the window above the cursor unless there are not enough lines
  • to display the full window height.

  • "below": place the window below the cursor unless there are not enough lines
  • to display the full window height. (default: 'auto')

Opts._update_win : nil | integer