-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
No way to emulate signcolumn=number
with statuscolumn
?
#21788
Comments
Seems reasonable to add to me, idk how core feels about adding new v:vars. Adding one that helps in tweaking the fold column could be useful as well. |
I think we're on a slippery slope of adding a bunch of v vars which is an idiom I've been wanting to move away from with Lua. Longer term options like |
@lewis6991 that's fair enough, I was a bit surprised I had to go through the incantation of the I guess in this particular case maybe we just have to accept that |
There is |
Yes, |
It doesn't work for extmarks |
So it turns out that if you supply a wildcard to the group it will properly list the placed signs(indeed except extmark signs but this was not the issue I ran into before). I previously only read the help with
|
that |
@luukvbaal thanks, this seems to work:
|
Yep. You could also choose to not supply |
I added support for this in my statuscolumn plugin here: luukvbaal/statuscol.nvim#15 (comment). I think that invalidates this issue? Unless if we want the |
Problem
I like the new
statuscolumn
capability, and am trying to use it to produce a more cleanly-formatted status column.Prior the option's availablility, I used:
set number
set relativenumber
set signcolumn=number
This worked well, as lines would show a number unless there was a sign, in which case that sign would be overlaid in the number column instead. This saves horizontal space, and most numbers are still present (OK if you are just using them for navigation hints).
Unfortunately, as best I can tell, there doesn't seem to be a way of replicating that behaviour with
statuscolumn
. The sign column%s
format item allows for the sign to be shown, but there's no way to test whether a sign is present and conditionally return/show a line number. Possibly I could iterate over all signs in the document (not sure how to get them) but that seems horribly inefficient for something evaluated on every line/redraw.Expected behavior
Ideally, I'd be able to write code something like this:
The new element in the code above that doesn't exist in the current featureset (as far as I know) is
vim.v.has_signs
.Thanks for all the hard work on NeoVim!
The text was updated successfully, but these errors were encountered: