You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Details
This change allows the user to configure how the space around the
language (above a code block) is filled, allowing for the appearance of
"tabs", rather than always having an even fill.
Previously this was not supported because of all the potential edge
cases around the language info section, user configuration, and overall
configuration (like differences in concealing).
To avoid all this complexity the implementation has been re-written to
fully overlay the border lines, removing anything custom underneath the
user may have set. This may cause problems for some obscure usage but I
can't currently think of any.
To continue supporting any potential additional info set in the language
section (a not very popular feature but it exists), the info section is
now added to the overlay. Two new features control this behavior,
`code.language_info` decides whether to include the text in general
(true by default), and `code.highlight_info` is the highlight used for
that part of the virtual text.
The main new option is `code.language_border`, which is the icon that
will be used to fill in any additional space on the language info line.
By default it is set to the full block character `█`, so when the
highlight is applied it continues to look like the `thick` border style
that was used before. To get something that looks more like a tab use
the half block character `▄`. More options may be added in the future
like a prefix and a suffix to further improve how border is rendered.
There is an edge case for users who have set `code.highlight_border` to
false, the `language_border` icon will get ignored and a space `' '` is
used to fill the gaps instead. This is because any configured characters
are unlikely to look good with the padding highlight applied to them.
As a consequence of this updated behavior we no longer rely on `inline`
virtual text to render the language, so neovim versions < `0.10.0` will
now work with the left aligned language.
While there might be some differences in behavior for some users, for
the most part the defaults we are using should result in no visible
changes out of the box.
Co-authored-by: malasee <7711939+malasee@users.noreply.github.com>
0 commit comments