summaryrefslogtreecommitdiff
path: root/syntax.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-11 23:15:10 -0500
committerpommicket <pommicket@gmail.com>2023-01-11 23:15:10 -0500
commit024fd444d673be63ac23fc83481a8fe624127cbf (patch)
tree7c83af676466bdb23b30a10e13d80601a006d2a1 /syntax.c
parentdc1e9a3566927fe71bd254f8486be9eb99650783 (diff)
LANG_TEXT, turn off phantom completions for text/cfg/md files
Diffstat (limited to 'syntax.c')
-rw-r--r--syntax.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/syntax.c b/syntax.c
index 9b60d6a..0ff8ac9 100644
--- a/syntax.c
+++ b/syntax.c
@@ -88,6 +88,7 @@ static const LanguageName language_names[] = {
{LANG_JSON, "JSON"},
{LANG_XML, "XML"},
{LANG_GLSL, "GLSL"},
+ {LANG_TEXT, "Text"},
};
static_assert_if_possible(arr_count(language_names) == LANG_COUNT)
@@ -135,6 +136,7 @@ const char *language_comment_start(Language l) {
return "<!-- ";
case LANG_NONE:
case LANG_MARKDOWN:
+ case LANG_TEXT:
case LANG_COUNT:
break;
}
@@ -1728,6 +1730,7 @@ static void syntax_highlight_go(SyntaxState *state_ptr, const char32_t *line, u3
void syntax_highlight(SyntaxState *state, Language lang, const char32_t *line, u32 line_len, SyntaxCharType *char_types) {
switch (lang) {
case LANG_NONE:
+ case LANG_TEXT:
if (char_types)
memset(char_types, 0, line_len * sizeof *char_types);
break;