Improve language colorizers (#54)
* fix detection of javascript partial comments in diff output * colorize python annotations * add simplistic yaml colorizer * colorize .gitignore files * improve shell buffer diff output colorization
This commit is contained in:
parent
13f0d3bec9
commit
e4fb8c8428
4 changed files with 86 additions and 22 deletions
|
|
@ -57,6 +57,7 @@ enum {
|
|||
PYTHON_STYLE_KEYWORD = QE_STYLE_KEYWORD,
|
||||
PYTHON_STYLE_FUNCTION = QE_STYLE_FUNCTION,
|
||||
PYTHON_STYLE_REGEX = QE_STYLE_STRING,
|
||||
PYTHON_STYLE_ANNOTATION = QE_STYLE_PREPROCESS,
|
||||
};
|
||||
|
||||
enum { // Python flavors
|
||||
|
|
@ -103,6 +104,11 @@ static void python_colorize_line(QEColorizeContext *cp,
|
|||
style = PYTHON_STYLE_COMMENT;
|
||||
break;
|
||||
|
||||
case '@':
|
||||
i += ustr_get_identifier(kbuf, countof(kbuf), c, str, i, n);
|
||||
style = PYTHON_STYLE_ANNOTATION;
|
||||
break;
|
||||
|
||||
case '\'':
|
||||
case '\"':
|
||||
/* parse string constant */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue