Hi,
Does anyone have any experience of integrating with the awesome BracketHighlighter plugin or know of any packages that do so?
There are two things I want to achieve:
-
I have created a package that contains a language syntax for RichTextFormat (rtf), in which only curly braces have any importance. I would like to ship something with my package that will ensure that BracketHighlighter doesn’t get confused when normal parenthesis are used in such a way that they don’t line up with the braces, for example, here you can see the
?
shows that BH doesn’t understand what should match with what: -
The other thing I want to achieve is for the xpath plugin. It works by parsing the open document with an XML parser and storing the location of all the tags. I was wondering if there was a way to get BH to use this information, to save it from having to duplicate the work (with it’s regular expressions), and at the same time, overcome the “max distance between tags” that it highlights, so that even for large files, it will show the opening and closing tags without any performance penalty.
I have seen the documentation about customizing the way the bracket matching works and it seems that I could create a plugin for BH, but I’d really like to see some examples of it in use, or for someone to help me work out what I need to do. I am worried that the way I choose to do it will be more complicated than is really necessary… How would BH/Sublime/Python know to read my package’s files to see if there is a plugin for BH amongst them?
Thanks for your time,
Keith