Hacker News new | ask | show | jobs
by coldtea 3561 days ago
So what are those "certain ways" that show ST3's "crazy architecture"?

https://github.com/facelessuser/BracketHighlighter

And is it crazy overall, or just when it comes to handling brackets from a plugin, in which case, it might just be a corner case that was not originally catered for?

1 comments

You can't define a colour in the plugin. You HAVE to define it in a theme. It's ridiculous, because then you have to define it for EVERY theme you switch to.
This sounds totally sane -- and the best way and most flexibile way to go about it, not crazy.

Highlight colors should be the responsibility of highlight themes, and users should be able to change them by changing the theme they use or adjusting it to their taste, not by ...hacking into a plugin that hardcodes them.

At best you could argue that the plugin could be allowed to hardcode a color, and themes could optionally override it -- but even that breaks separation of concerns.

Even if it was crazy (which it is not) it's a tiny part of ST (just how the syntax highlighting works), and wouldn't be proof of any general "crazy architecture" of the editor.

Why is hacking into EVERY THEME you wish to use better than hacking into a single plugin?
You're free to make a pull request for the plugin to implement this.
It CAN'T be implemented, that's the point