editor: add plain language with no grammar

This commit is contained in:
2026-11-11 09:41:56 +07:00
parent 63ed15c9cb
commit 65509ccde1
3 changed files with 19 additions and 1 deletions
+2
View File
@@ -26,6 +26,7 @@ struct Highlighter {
/// A language source can highlight as.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Language {
Plain,
Rust,
JavaScript,
TypeScript,
@@ -163,6 +164,7 @@ fn grammar_for(language: Language) -> Option<(tree_sitter::Language, &'static st
Language::TypeScript => typescript_grammar(),
Language::JavaScript => javascript_grammar(),
Language::Python => python_grammar(),
Language::Plain => None,
}
}