Skip to content
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

make :toggle-option print the new value #6774

Merged
merged 2 commits into from
Apr 16, 2023

Conversation

zummenix
Copy link
Contributor

I think some kind of feedback is useful for this command. I chose to set the status line with format key = new_value. For example, :toggle lsp.enable will set the status line to lsp.enable = false or lsp.enable = true after successfully applying updated config to the editor.

@pascalkuthe pascalkuthe added E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer. C-enhancement Category: Improvements labels Apr 16, 2023
Copy link
Member

@pascalkuthe pascalkuthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good usability improvement to me. One minor style nit: I think this code could be clear if we just extracted the value with let .. else and then just did let new_value = !old_value.

@zummenix zummenix force-pushed the toggle-option-shows-status branch from 52a407c to cafa26f Compare April 16, 2023 13:46
@zummenix
Copy link
Contributor Author

@pascalkuthe Nice! Done.

pascalkuthe
pascalkuthe previously approved these changes Apr 16, 2023
Copy link
Member

@pascalkuthe pascalkuthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
@zummenix zummenix force-pushed the toggle-option-shows-status branch from b53c59b to 96c6042 Compare April 16, 2023 18:27
@pascalkuthe pascalkuthe changed the title :toggle-option shows status for the option make :toggle-option show the new value Apr 16, 2023
@pascalkuthe pascalkuthe changed the title make :toggle-option show the new value make :toggle-option print the new value Apr 16, 2023
@pascalkuthe pascalkuthe merged commit 7706ff7 into helix-editor:master Apr 16, 2023
@zummenix zummenix deleted the toggle-option-shows-status branch April 17, 2023 04:02
Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants