aboutsummaryrefslogtreecommitdiff
path: root/book/src
diff options
context:
space:
mode:
Diffstat (limited to 'book/src')
-rw-r--r--book/src/languages.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/book/src/languages.md b/book/src/languages.md
index c5a7708f..3372a120 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -28,4 +28,13 @@ name = "c"
source = { path = "/path/to/tree-sitter-c" }
```
-If a user has a `languages.toml`, only the grammars in that `languages.toml` are evaluated when running `hx --fetch-grammars` and `hx --build-grammars`. Otherwise the [default `languages.toml`](https://github.com/helix-editor/helix/blob/master/languages.toml) is used.
+You may use a top-level `use-grammars` key to control which grammars are fetched and built.
+
+```toml
+# Note: this key must come **before** the [[language]] and [[grammar]] sections
+use-grammars = { only = [ "rust", "c", "cpp" ] }
+# or
+use-grammars = { except = [ "yaml", "json" ] }
+```
+
+When omitted, all grammars are fetched and built.