-
-
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
Update settings at runtime #798
Conversation
@irevoire I think you should try kakoune and take inspiration from it, IIRC our current structure for this part is partly based on kakoune so I guess we could do a similar settings there. Like |
Hey, I took a little bit of time to look into kakoune's conf option; I also like their command Whatever happens, I would love to do this work if you are not in a hurry 😄 |
1cbd1ab
to
3608654
Compare
74451fb
to
2092d34
Compare
fix the clippy warning
2092d34
to
b9cdccb
Compare
Hello @archseer @pickfire, sorry for being this slow to apply your suggestion. Also, I went with a minimal implementation that does not handle the shell things and force you to have precisely three arguments. Another issue that with this PR is the auto-completion of commands, though. Currently, we have no way to propose values or even detect that we are in the value part and stop trying to autocomplete with keys from what I understand 🤔 I think we can merge this PR as-is, and since the code is quite simple to follow, maybe someone will come back to it and improve it. I don't have a lot of time to put into helix currently, sadly 😔 (and sorry for all the force push, but there was a big rebase to do to come back to master) |
Hello,
I would love to add this feature to helix, but there are multiple issues that I don't know how to solve currently.
I can see multiples solutions here, but I'm not a fan of either of them:
match
on thekeys
of the deserialized conf and updates thecurrent_conf
accordingly:Configuration
struct is going to evolve, we'll need to remember to update this match.Configuration
one but with every field asOptional
, and then implements a merge between this new struct and the current one. Same problem as the previous solution.lazy_static
and consider that this code is really not called often and don't need to be fast.line-numbers
I would like the autocomplete to propose "relative" or "absolute" instead of nothing or bad thingsHere is a little demo of how it works currently: https://asciinema.org/a/0KjjI5CsWPFwXGuxqN7ERTh4x
Let me know if you are interested and have any idea on how to improve these things.
I would really love to see this feature implemented because when I'm sharing my screen with a colleague, it's easier for them to have absolute line numbers. While when I'm alone, I'm usually deactivating
line-numbers
entirely and having to update my global configuration is really boring 😒