The new syntax highlighter has confusing colors for different token types in C:
The same reddish color is used for function names, structure tags, types and numbers. Prettify did not use to differentiate identifiers and function names from punctuation and operators. Using a different color makes them stand out as a different type of token, which is fine, but using the same color for these 4 different cases is confusing as they do not have the same semantic value.
The same blue color is used for keywords and preprocessing directives: again a very different semantic value
#include <stdio.h>
// this is a comment
/* this is a comment too */
#define TRUE 1
typedef struct str_s {
char *str;
size_t len;
} string;
typedef struct str_t {
char *str;
size_t len;
} mystring;
int main(void) {
char dest[10];
printf("Hello world\n");
strcpy(dest, "ABC");
string s;
s.str = dest;
s.len = strlen(s.str);
return 0;
}
In the above code snippet, I don't even understand why string
is colored in red whereas mystring
is not.
Can we have the previous theme colors?
Can the theme colors depend on the language tag?
Can we customize the theme colors?
how
this colorscheme
i
s making me feel.͕̝̺̘̾̽ͤ͢͟͡default.css
code from highlightjs github repo, paste it in Stylus editor, add!important
to all the rules in just a few minutes. Then use the built in color picker in the Stylus stylesheet editor to see real time changes on a page such as this one or on SO proper. Even if the dev team does offer up different themes it's still nice to have your own tweaked to personal tastehljs-built_in
style:string
is not a C built-in anything.