Add tree-sitter-markdown, set up simple markdown higlighting
This commit is contained in:
parent
026c3476db
commit
b1ed9c88a4
7 changed files with 61 additions and 2 deletions
|
@ -27,8 +27,11 @@ fn rust() -> Language {
|
|||
}
|
||||
|
||||
fn markdown() -> Language {
|
||||
let grammar = tree_sitter_markdown::language();
|
||||
let config = toml::from_slice(&LanguageDir::get("markdown/config.toml").unwrap().data).unwrap();
|
||||
Language::new(config, None)
|
||||
Language::new(config, Some(grammar))
|
||||
.with_highlights_query(load_query("markdown/highlights.scm").as_ref())
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn load_query(path: &str) -> Cow<'static, str> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue