gphalkes / tilde

The Tilde text editor
395 stars 21 forks source link

Feature request: Separate hightlight colors #42

Open ghost opened 5 years ago

ghost commented 5 years ago

"Feature request" Separate the colors for each type of code. Something like, html one set of colors, and css another set of colors. Profiles maybe.

gphalkes commented 5 years ago

I'm looking into how to implement this. There are multiple aspects to this which need to be implemented (this is mostly for myself to remember what to consider):

  1. The UI part, which somehow needs to be able to allow the user to pick colors per code-type.
  2. Embedding of one set of highlightings inside another. E.g. HTML can have embedded CSS. This is implemented by including the highlighting from CSS into the HTML patterns. The way the attributes are assigned right now doesn't allow to distinguishing between the embedded and the outer highlightings. One way to do this is to use different attribute names, but I also want it to fallback to the default set of attribute names for when the user doesn't specify anything specifically for the different code types.
  3. (Backward-)compatibility with the existing code
  4. Configuration saving and loading in Tilde
gphalkes commented 5 years ago

Progress: implementation of the configuration in the highlighting configs is done (https://github.com/gphalkes/t3highlight/commit/21da25d1005ce8110ce4184349544aaded3cb994). Reworking the internals of the Tilde highlighting handling is also done (https://github.com/gphalkes/tilde/commit/6aad44394e2ba37a0d4e99aab13afbb6273f9fe9).

Left to do: redo the storing of highlighting attributes in the config, because the current implementation can't handle the more complex attribute names; implement a UI to select attributes.