Embed a plain text grammar and override settings for that too
This commit is contained in:
parent
2c17ae9aa6
commit
9d7039ed51
4 changed files with 25 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::HighlightMap;
|
||||
use anyhow::{anyhow, Result};
|
||||
use gpui::{executor::Background, AppContext};
|
||||
use lazy_static::lazy_static;
|
||||
use lsp::LanguageServer;
|
||||
use parking_lot::Mutex;
|
||||
use serde::Deserialize;
|
||||
|
@ -9,6 +10,19 @@ use theme::SyntaxTheme;
|
|||
use tree_sitter::{self, Query};
|
||||
pub use tree_sitter::{Parser, Tree};
|
||||
|
||||
lazy_static! {
|
||||
pub static ref PLAIN_TEXT: Arc<Language> = Arc::new(Language::new(
|
||||
LanguageConfig {
|
||||
name: "Plain Text".to_string(),
|
||||
path_suffixes: Default::default(),
|
||||
brackets: Default::default(),
|
||||
line_comment: None,
|
||||
language_server: None,
|
||||
},
|
||||
None,
|
||||
));
|
||||
}
|
||||
|
||||
#[derive(Default, Deserialize)]
|
||||
pub struct LanguageConfig {
|
||||
pub name: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue