facelessuser / BracketHighlighter

Bracket and tag highlighter for Sublime Text
https://facelessuser.github.io/BracketHighlighter/
1.75k stars 245 forks source link

BH broken after last update (4142 and 4143) #610

Closed rusproject closed 1 year ago

rusproject commented 1 year ago

Description

The problem is on the screenshots. The package just doesn't work correctly anymore.

image image image

Support Info

Steps to Reproduce Issue

  1. Use BracketHighlighter with previous actual ST build
  2. Update to the latest ST version (4142 and then 4143 next day, don't know which one broke BH)
  3. Try, for example, PHP lang and multi-line array with square brackets.
rusproject commented 1 year ago

For those who stubmled against same problem:

Temporary fix is to uninstall ST and install previous version, here's link: https://download.sublimetext.com/sublime_text_build_4126_x64_setup.exe

facelessuser commented 1 year ago

When you post examples, pictures are fine, but please always post examples in plain text as well. I cannot copy/paste and reproduce easily within image.

Now, on to the issue. I'm on the latest dev branch and am not experiencing this at all. I'm not sure if something went wrong after the update and you needed to re-install BH, but I cannot reproduce this issue.

Screenshot 2022-11-11 at 5 39 50 PM

Now, the latest stable is supposed to include everything that the last dev release had before the stable release, so there shouldn't be any difference at all.

rusproject commented 1 year ago

Thanks, I'll keep it in mind.

The reason for my problem was that I was modifiyngs "brackets" section in my user-settings file. To make it work I copied whole "brackets" section from default bh_core.sublime_settings file to user settings file, and then edit some parts (I add 2 more lines to "php_angle" and "angle" brackets just to add one more syntax (Smarty) there).

All worked fine untill last ST update, but that update broke it for some reason, causing that behaviour on screenshots.

Now I copied not whole "brackets" section, but instead of that, I created "user_brackets" section in user-settings file, and copied only "php_angle" and "angle" there, then made my edits.

All works fine now, thank you.

P.S. I suppose we need more documentation about How to edit default settings? somewhere. Maybe I just didn't find it in official docs.

facelessuser commented 1 year ago

There is no need to copy the entire brackets section, just use user_brackets to override an existing rule or add additional rules.

We do have documentation on managing bracket rules: https://facelessuser.github.io/BracketHighlighter/customize/#bracket-rule-management.

I am open to a PR if a better approach can be constructed.

rusproject commented 1 year ago

Yeah, already get it, thank you. No new ideas about it right now, the mechanics is pretty straightforward, I just missed that section of the docs, my bad. By the way, it would be great to have a link to the documentation on the very top of sublime-settings file in the comment.

facelessuser commented 1 year ago

I'd be open to a PR that adds links to specific sections of the documentation for relevant settings that are not clear.