Hacker News new | ask | show | jobs
by gotofritz 3561 days ago
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.
2 comments

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