-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
WIP: Utility Gutter #1272
WIP: Utility Gutter #1272
Conversation
We don't have plugins yet, so configuring the utility gutter to show arbitrary text would have to happen through the TOML config, and I'm not sure if we should allow that. I imagine it would need to execute a shell command, clip the output size, conditionally run it, etc. It could grow into a DSL within the toml config and that's something we want to avoid (i.e. strapping on programming features to a config language). |
Yeah, I was expecting the gutter fns themselves be flexible enough that plugins can use them to define new gutters -- rather than one generic utility gutter. |
The config would just be an array of which gutters to use (and the widths?), it would replace the hard-coded gutters in view.rs |
Thank you both for looking over this code.
I wouldn't want to put scripting into the TOML.
Okay. I really don't know what type of interface plugins are going to have, but I do think I understand what you're saying overall. I think having multiple possible gutters specified by plugins or other means like TOML and making it extensible sounds great! Do you mean by abstracting I see #769 but I didn't study it yet. I was hoping (at least ultimately) to have the ability to do things like pass arbitrary text (maybe plugin or real-time, or pre-generated) to the gutters (which I would imagine would often correspond to line numbers) but I also didn't know exactly how I was going to approach it. Right now the Is there a plugin interface that I should look at? Or even a plan for one I could use to demo something?
Yes, and I have been working locally on some things more in this direction, I think. What you're suggesting might not come online immediately but I'd like to continue on this branch if it's worth people's time to consider. |
I would very much like to not make the width mandatory if possible. |
My plan is to make the current two gutters default to on (diagnostic has The |
I wasn't able to definitively cut into this problem with my level of understanding of helix. I still think having a configurable utility gutter (and flexible, configurable width gutters) is a good idea, but I was not yet able to make definitive progress. I may try to return to this issue, but I have stopped active attempts for the time being. |
Pushing commits of last changes I was working with locally. |
@dannasessha I converted it to draft, later once you are done can convert it back. |
Should we close this out? With #1967 merged it may be easier to restart from |
Yep, agreed |
DRAFT. Fixes #1188.
Working toward an additional, configurable gutter, and to make gutters more configurable generally.
The new
utility
gutter should be able to handle arbitrary text, likely corresponding to the opened document. For example, the gutter could display short commit hashes by line provided bygit annotate
.