aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/indent.rs
diff options
context:
space:
mode:
authorMichael Davis2022-02-13 18:11:44 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commitc1f90a127b972c8b41b0d24dcacb3bdd480be9c5 (patch)
tree9ffb639d81d28f82dabf88cb3b577459600d2076 /helix-core/src/indent.rs
parentfbb98300dfa4cf12c8aacb1242baab3644e54951 (diff)
add tree-sitter sources to languages.toml
Here we add syntax to the languages.toml languge [[grammar]] name = "<name>" source = { .. } Which can be used to specify a tree-sitter grammar separately of the language that defines it, and we make this distinction for two reasons: * In later commits, we will separate this code from helix-core and bring it to a new helix-loader crate. Using separate schemas for language and grammar configurations allows for a nice divide between the types needed to be declared in helix-loader and in helix-core/syntax * Two different languages may use the same grammar. This is currently the case with llvm-mir-yaml and yaml. We could accomplish a config that works for this with just `[[languages]]`, but it gets a bit dicey with languages depending on one another. If you enable llvm-mir-yaml and disable yaml, does helix still need to fetch and build tree-sitter-yaml? It could be a matter of interpretation.
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r--helix-core/src/indent.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index 9a329d95..83b2be94 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -444,6 +444,7 @@ where
debugger: None,
auto_pairs: None,
}],
+ grammar: vec![],
});
// set runtime path so we can find the queries