* `filetype.cpp` etc use `[styling=C]` and `[lexer_properties=C]` so will inherit the changes. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2157
-- Commit Summary --
* Highlight escape sequences in LexCPP filetypes
-- File Changes --
M data/filedefs/filetypes.c (3)
-- Patch Links --
https://github.com/geany/geany/pull/2157.patch https://github.com/geany/geany/pull/2157.diff
WFM
I don't mind if escapes are different, what do others think?
@b4n wrote in 67329f2b9 "The new C styles escapesequence and taskmarker are currently mapped conservatively, and may benefit from a more visible mapping". So it looks like this never got followed up.
I think users will be unaware of this feature if it isn't on by default. I doubt people will want to turn it off, but they can if they want by looking in `filetypes.c`, which is an intuitive place.
I think most people using [geany-themes](https://github.com/geany/geany-themes) won't even notice if it's turned on since AFAICT most themes map `string_2` to `string_1`.
If this is merged, it might be interesting to do a follow up for geany-themes to make them use a visually distinct style for this. Maybe even just adding bold to whatever is existing would be enough?
most themes map string_2 to string_1
In that case perhaps this should use the `default` named style.
Maybe even just adding bold to whatever is existing would be enough?
string2 is also used for raw strings so bold probably isn't a good fit.
Instead of `string_2` I've made string escapes use `string_1,bold`.
Instead of `string_2` I've made string escapes use `string_1,bold`.
I'm not sure forcing a style attribute is a good idea, as it won't have any effect if the base style has it already. Also bold specifically apparently sometimes cause issues with some poor fonts that get emulated boldness that lead to not truly fixed width characters, and so I heard more than once people wanting to get rid of it.
What about adding a new style altogether, and provide a reasonable default using another named style? e.g. introduce `string_escape_1=string_1` and themes can override this to something else. I didn't check if we can currently do that, but it sounds better to me than try and fit one of the styles we already have that don't really make semantic sense.
I didn't check if we can currently do that, but it sounds better to me than try and fit one of the styles we already have that don't really make semantic sense.
I'm pretty sure it was called `string_2` to remain generic enough for this type of thing. If not `string_2` then use `string_3` or `string_4` which I don't believe are used much.
I'm pretty sure it was called `string_2` to remain generic enough for this type of thing. If not `string_2` then use `string_3` or `string_4` which I don't believe are used much.
Hum, so these names are not clear enough and should be better documented; because my understanding was rather that the `string_N` where for different kind of strings (plain, raw, here document, etc.), and I always mapped with this concept in mind.
I'm not sure forcing a style attribute is a good idea
The style IMO should be whatever string_1 is plus bold. Users who make string_1 use bold is not something we should worry about, it's not sensible. Adding a named style that defaults to `string_1,bold` would work if you prefer the override in a central place so weird bold string themes can override it with something distinctive ;-)
Also bold specifically apparently sometimes cause issues with some poor fonts
We already use it for keywords. Those users should fix their fonts.
I'm pretty sure it was called string_2 to remain generic
C file type uses it for raw strings. Escape sequences are not raw strings so should be styled differently ideally.
github-comments@lists.geany.org