-
-
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
Make matching brace higlighting configurable #3242
Make matching brace higlighting configurable #3242
Conversation
Instead of having this configurable with a config option it could just use theme rules: |
Before it was based on config, now it is based on the theme, with new keys `ui.cursor.match.primary` and `ui.cursor.match.secondary`.
8328746
to
178ff59
Compare
.try_get("ui.cursor.match.secondary") | ||
.unwrap_or(default_style); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of falling back to the default_style I think we should not have any fallback behavior for ui.cursor.match.secondary
so that you can not highlight secondary cursor matches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not highlighting the secondary cursor matches is still possible with "ui.cursor.match.secondary" = {}
. So either way both are possible, the question is what should be the default. Personally I think highlighting secondary matches is a sensible default behavior, but it's up to you :)
I think secondary cursor match highlighting is pretty noisy. I only use the primary match in cases where I'm not sure what nesting level I'm on and if it were toggle-able I would probably only enable showing the primary match sparingly. I don't run into the same use-case for secondary matches so I most likely would not enable this in my theme. Maybe this should be configurable in editor config rather than theme? It could be set to Sorry for the bike-shedding 😅 |
As a new user (not that many days ago) my knee jerk reaction to not seeing color modes after enabling it made me think it was a bug with Helix. In fact is was just my theme not being up to date, and I would call that a bug too (fixed in a PR of course :) ). I feel (rather strongly) that a Helix theme should accommodate all Helix features. Opting in/out of feature x should not imply editing a theme or changing a theme imho. My |
clsoing this PR as stale. I also dont think we will be going forward with this (see mikes comment above). Thank you for contributing! |
Resolves #3228 by making matching brace highlighting configurable:
none
,all
,primary
, defaulting toall
.New default behavior: