Le 21/02/2023 à 12:28, Lex Trotman via Users a écrit :
On Tue, 21 Feb 2023 at 18:23, Ban via Users users@lists.geany.org wrote:
What do you mean "highlight comment"? I'm wondering because you're saying you activated it, so I'm not sure you're referring to syntax highlighting (code coloration) or something else.
Also I don't think we have any Ring file type (correct me if I'm wrong), so is that custom from somewhere?
The ring project https://ring-lang.github.io/doc1.17/codeeditors.html#using-geany
OK, I tested and I see the problem: I'm not sure why, but they manually mapped comment styles to (partial) colors (";0xfcfcfc;;true", which is "foreground;background;bold;italic", see https://geany.org/manual/#styling-section). This won't play nice with a custom color scheme, here a dark one.
You have 2 options:
1) (which I'd recommend) remove all content of the [styling] section in filetypes.Ring.conf, and replace that section with [styling=C]. It means inheriting from the C filetype, which is the one containing the definitions (because filetypes.Ring.conf uses lexer_filtype=C). I have no idea why they manually mapped all comment styles to a custom value, but so they did...
2) the override they have is the "default" style, with background 0xfcfcfc, and italics. You could replace this with either ";;;true" or "default,italic" to still use the "default" style mostly, but with italics. Not sure if it's actually any better than using the regular comment styles though...
In any case, I suggest you submit an issue/patch upstream for them to use a filetype that will play nicely with colorschemes (and especially not be terribly broken with dark ones, as it seems to be fashion nowadays).
Regards, Colomban
PS: actually, in any case it'd be better to use [styling=C] and only include overrides meant to exist in that section, that'd remove duplication, and avoid breaking if the lexer gains new styles.