Settings in docs stop default `expand selection` working correctly
benfrain opened this issue · 9 comments
Description
The settings described here https://facelessuser.github.io/BracketHighlighter/usage/
"match_brackets": false,
"match_brackets_angle": false,
"match_brackets_braces": false,
"match_brackets_content": false,
"match_brackets_square": false,
"match_tags": false,
seem to stop the default 'expand selection' to work correctly.
Here was the issue I was having: sublimehq/sublime_text#4093
Support Info
- ST ver.: 4102
- Platform: osx
- Arch: arm64
- Plugin ver.: 2.29.1
- Install via PC: True
- mdpopups ver.: 4.1.1
- backrefs ver.: 5.0
- markdown ver.: 3.2.2
- pygments ver.: 2.1a0
- jinja2 ver.: 2.10.1
Steps to Reproduce Issue
- Ensure settings described in docs are present in Preferences
- Select inside a CSS rule and use 'expand selection' command
- Note that expansion is not as it should be
You can enable ST native bracket highlighting if you like. Yes, it seems to disable ST's bracket highlighting and also disables its ability to expand to brackets. Often, I'm using BH's expand to bracket features, but I understand that being a problem if you want to use the built in expand for selections to braces and such. I guess, as an alternative, you could potentially enable Sublime's default bracket highlighting, and style it in a way that hides them.
So my question is, what are you requesting I do?
If the issue cannot be rectified so BracketHighlighter can play alongside those default editor expansion commands, I suppose the best option would be to add a warning in that section of the docs that disabling Sublimes matching will lead to problems with standard expansion commands.
I certainly think those settings lead to a worse user experience currently as it makes you think ST has a problem (there was some time between enabling those settings with BH and trying 'expand selection' and so I didn't make the connection).
The styling option seems worth investigating. Maybe add the warning in the docs for now, and remove it if you find a workaround?
The thing I don't understand is why turning off Sublime bracket matching disables bracket expansion. Just because I may not want to see Sublime's bracket matching, it doesn't mean I want to disable all bracket features. I'd still argue this to be undesirable in Sublime.
I was looking at this today, and maybe a better recommendation moving forward is to override the two color scheme variables:
"bracket_contents_options": "none",
"brackets_options": "none",
Here we can hide the visualization so it doesn't clash with BH without disabling bracket abilities in Sublime.
These as well:
"tags_options": "none"
I've updated the documentation to reflect the new recommendation. I'm open to alternative suggestions, but I think the new recommendation is the best that can be done. I'll update the documentation site later today.
Thanks @facelessuser I look forward to enabling it again. Already miss selection inside quotes! 👍🏻
@facelessuser prior to doc updates, can you confirm, is the following now all the options that need setting?:
"bracket_contents_options": "none",
"brackets_options": "none",
"tags_options": "none",
{
"variables": {},
"globals":
{
"bracket_contents_options": "none",
"brackets_options": "none",
"tags_options": "none"
},
"rules": []
}
That's in my current override. If you have additional issues, let me know, but as far as I can tell, that is sufficient.