diff options
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | syntax.c | 5 | ||||
-rw-r--r-- | ted.cfg | 4 | ||||
-rw-r--r-- | ted.h | 2 |
4 files changed, 8 insertions, 5 deletions
@@ -1,6 +1,4 @@ /* -@TODO: -- higlighlight directives in ted.cfg FUTURE FEATURES: - styles ([color] sections) - for this, it would be nice to have #include in ted.cfg @@ -1190,6 +1190,11 @@ static void syntax_highlight_cfg(SyntaxState *state, const char32_t *line, u32 l return; } + if (!string && is_ted_cfg && line[0] == '%') { + memset(char_types, SYNTAX_PREPROCESSOR, line_len); + return; + } + int backslashes = 0; for (u32 i = 0; i < line_len; ++i) { @@ -441,8 +441,8 @@ GLSL = .glsl, .tesc, .tese, .vert, .frag, .geom, .comp HTML = .html, .php, .xhtml XML = .xml, .iml Config = .cfg, .toml -# ted.cfg has its own syntax highlighting for multiline strings. -TedCfg = ted.cfg, .ted.cfg +# ted.cfg has its own syntax highlighting +TedCfg = ted.cfg JavaScript = .js TypeScript = .ts JSON = .json @@ -70,7 +70,7 @@ enum { LANG_JAVA = 10, /// Go LANG_GO = 11, - /// like \ref LANG_CONFIG, but with multiline strings. + /// like \ref LANG_CONFIG, but with more highlighting for ted.cfg-specific stuff. LANG_TED_CFG = 12, /// TypeScript LANG_TYPESCRIPT = 13, |