-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set multiple chars for spaces and tabs + leadmultispace chars move around when toggling #939
Comments
Yes, because IBLs
This is a bug. I made a fix in #940
You can change the highlight of the whitespace, take a look at :help hl-IblWhitespace: |
Honestly, fixing the characters shifting around is really all I needed. Thank you for solving it so quickly, and for bearing with my ramblings... I've updated and everything is okay now! I'm glad it really was a bug and not me going crazy...
I didn't realize this! Thanks for pointing it out because I also was wondering how I'd missed
I'm honestly okay if things stay as they are, but I'm curious how this would be a breaking change... If you changed
Makes sense 👍
Oh yeah I missed that! Edit: found it! https://github.com/LuaLS/lua-language-server/wiki/Annotations |
Problem
This is a duplicate of #665 but I didn't want to necro it.
Context:
My use case:
├
for example but that doesn't seem to existSo, I've been trying to get
indent-blankline
to work with the followinglistchars
:The problem(s):
My understanding is as follows:
▎
, regardless of any vim settings▎
as well iflist
is not set, or withlcs-tab
if it is*ibl.config.indent.char
andibl.config.indent.tab_char
can only be one character, whereaslisttab
allowsleadmultispace
to be multiple characters, and requirestab
to be at least two.lcs-tab
is usedAs a consequence of the above, while one can set custom and different characters to represent space-based and tab-based characters, this configuration is not as flexible as
listchars
as one cannot set multiple characters to use based on the size of the indentation.... Which wouldn't be a big deal except I seem to be hitting some weird glitch where the (and this is a wild guess on my part) the virtual text from
indent-blankline
seems to be displacing Neovim's virtual text fromlistchars
?Without
indent-blankline
, this is the result, tabs on the left and spaces on the right:With
indent-blankline
toggled on, this is what things look like:And here's a clip of me toggling it on and off, showing the Neovim
lcs-leadmultispace
shifting position:Screencast_20241109_185329.webm
Recap:
ibl.config.indent.tab_char
respectslcs-tab
whenlist
is set, butibl.config.indent.char
doesn't respectlcs-leadmultispace
, which is inconsistent behaviorlistchars
, they can only be configured to a single character (or will use the first one inlistchars
if there's multiple), and thelistchars
still get displayed by Neovim so parts are re-colored, others aren't (which I'd be fine with, see Expected Behavior)lcs-leadmultispace
shift around whenindent-blankline
is toggled, leading to both showing, whereas forlcs-tab
the vertical line seems to nicely just get re-colored.Steps to reproduce
Here's the minimal
init.lua
I used to produce the screenshots I've attached. I've left in my color config as I think the colors do help distinguish between the plugin's and Neovim's virtual characters.Expected behavior
Most importantly I wouldn't expect the Neovim
lcs-leadmultispace
characters to move around when toggling the plugin. This seems like a bug to me (let me know if you'd like a separate issue filed for it)I also would ideally expect that
indent-blankline
would respectlist
andlistchars
if set, and simply recolor all the already-set characters (not just the first one). It just seems like the consistent and least-surprising behavior.However, after staring at this for a couple of days trying to fix it... I actually do really like the idea of only the vertical line being colored and the extra characters staying muted so as to not visually clutter the indentation more than it already is.
Neovim version (nvim -v)
0.10.1
The text was updated successfully, but these errors were encountered: