import { type NvimOpenWinConfig } from "https://deno.land/x/denops_std@v7.0.0-pre0/function/nvim/nvim_open_win.ts";
Properties
Sets the window layout to "floating", placed at (row,col) coordinates relative to:
- "editor" The global editor grid
- "win" Window given by the
win
field, or current window. - "cursor" Cursor position in current window.
- "mouse" Mouse position
Decides which corner of the float to place at (row,col):
- "NW" northwest (default)
- "NE" northeast
- "SW" southwest
- "SE" southeast
Places float relative to buffer text (only when
relative="win"). Takes a tuple of zero-indexed [line,
column]. row
and col
if given are applied relative to this position, else they
default to:
row=1
andcol=0
ifanchor
is "NW" or "NE"row=0
andcol=0
ifanchor
is "SW" or "SE" (thus like a tooltip near the buffer text).
Enable focus by user actions (wincmds, mouse
events). Defaults to true. Non-focusable windows can be
entered by nvim_set_current_win()
.
GUI should display the window as an external top-level window. Currently accepts no other positioning configuration together with this.
Stacking order. floats with higher zindex
go on top on floats with lower indices. Must be larger
than zero. The following screen elements have hard-coded
z-indices:
- 100: insert completion popupmenu
- 200: message scrollback
- 250: cmdline completion popupmenu (when wildoptions+=pum) The default value for floats are 50. In general, values below 100 are recommended, unless there is a good reason to overshadow builtin elements.
Configure the appearance of the window. Currently only takes one non-empty value:
- "minimal" Nvim will display the window with many UI
options disabled. This is useful when displaying a
temporary float where the text should not be edited.
Disables 'number', 'relativenumber', 'cursorline',
'cursorcolumn', 'foldcolumn', 'spell' and 'list'
options. 'signcolumn' is changed to
auto
and 'colorcolumn' is cleared. 'statuscolumn' is changed to empty. The end-of-buffer region is hidden by settingeob
flag of 'fillchars' to a space char, and clearing thehl-EndOfBuffer
region in 'winhighlight'.
Style of (optional) window border. This can either be a string or an array. The string values are
- "none": No border (default).
- "single": A single line box.
- "double": A double line box.
- "rounded": Like "single", but with rounded corners ("β" etc.).
- "solid": Adds padding by a single whitespace cell.
- "shadow": A drop shadow effect by blending with the background.
- If it is an array, it should have a length of eight or
any divisor of eight. The array will specifify the eight
chars building up the border in a clockwise fashion
starting with the top-left corner. As an example, the
double box style could be specified as [ "β", "β" ,"β",
"β", "β", "β", "β", "β" ]. If the number of chars are
less than eight, they will be repeated. Thus an ASCII
border could be specified as [ "/", "-", "\", "|" ], or
all chars the same as [ "x" ]. An empty string can be
used to turn off a specific border, for instance, [ "",
"", "", ">", "", "", "",
"<"
] will only make vertical borders but not horizontal ones. By default,FloatBorder
highlight is used, which links toWinSeparator
when not defined. It could also be specified by character: [ ["+", "MyCorner"], ["x", "MyBorder"] ].
Title (optional) in window border, String or list.
List is [text, highlight] tuples. if is string the default
highlight group is FloatTitle
.
Title position must set with title option.
value can be of left
center
right
default is left.