Pistos / diakonos

Diakonos is a console text editor for the masses.
https://git.sr.ht/~pistos/diakonos
Other
137 stars 11 forks source link

Overriding colors in "shared" namespace doesn't seem to redefine namespaces that inherit from it #2

Closed protobits closed 14 years ago

protobits commented 14 years ago

What I mean is that I'm redefining stuff in @lang.shared.tokens.*.format@ but namespaces (like bash, c, etc) that supposeddly pull the format attribute from @shared@ aren't affected. Instead, I have to manually inherit them again like: @lang.bash.format.default = lang.shared.format.default@

I notice this problem because I redefined the "format.default" to have a different background color, and whenever I don't do such assignment I see the default background color.

Pistos commented 14 years ago

Yes. Diakonos will read all configuration files top to bottom. The lines that used the shared colours are one-time assignments; they're not mapping rules that are dynamically recalculated repeatedly. To achieve what you're describing, try to make a separate file (say, "my-shared-colours.conf") and then put an include directive in the main configuration file in a suitable spot. For example, you could put it here. That way, your custom shared colours are defined before the language colours are defined.

protobits commented 14 years ago

Oh, ok. It's just that I use diakonos in different computers so I like to keep my settings in my user's configuration files. I can live with it for the moment.