Open adigitoleo opened 2 years ago
Relevant section of :h neovim_open_win
:
• border: 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 to `VertSplit` when not defined.
It could also be specified by character: [
{"+", "MyCorner"}, {"x", "MyBorder"} ].
Of course the border chars are specified in a different order, ugh. From vim:
borderchars List with characters, defining the character to use
for the top/right/bottom/left border. Optionally
followed by the character to use for the
topleft/topright/botright/botleft corner.
Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└']
When the list has one character it is used for all.
When the list has two characters the first is used for
the border lines, the second for the corners.
By default a double line is used all around when
'encoding' is "utf-8" and 'ambiwidth' is "single",
otherwise ASCII characters are used.
I was away for a while and it seems neovim have now finally implemented floating window borders, I think in https://github.com/neovim/neovim/pull/13998.
Example:
Border highlight group is
FloatBorder
(undocumented).Maybe transitioning to this API will help resolve some of the weird border issues.