kakoune/rc
Chris Webb 86979841b7 Improve c-family highlighting of preprocessor directives
The current handling of preprocessor directives in filetype/c-family.kak
leads to a wall of solid colour for more complicated #if or #define
directives, although #include is already nicely highlighted.

Instead of highlighting an entire directive with the meta face, highlight
just the #define, #if or #elif keyword as meta, treating the rest of the
directive as normal c-family expressions. This significantly improves
the readability of complex macro definitions.

For directives other than #define, #if and #elif, we treat the rest of
the directive as an opaque string in normal face rather than trying to
highlight it, covering cases like #error, #pragma, etc. where the rest
of the line is an error message string or other non-expression content.

This does the right thing for #ifdef and #ifndef too, as we don't highlight
identifiers in c-family text so their arguments should be normal face
anyway.
2023-12-10 13:50:29 +00:00
..
detection rc detection modeline: optimize modeline pre-filtering 2023-06-02 22:38:32 +02:00
filetype Improve c-family highlighting of preprocessor directives 2023-12-10 13:50:29 +00:00
tools Merge remote-tracking branch 'krobelus/fuzzy-menu' 2023-12-02 10:56:29 +11:00
windowing pass cwd for wezterm terminal 2023-07-27 13:28:37 +08:00