summaryrefslogtreecommitdiff
path: root/book/src/guides
diff options
context:
space:
mode:
authorMichael Davis2022-03-08 06:13:15 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commit7044d7d804ad798207594e1b3bb5bd80a96d3da0 (patch)
tree2456d38b7e586641005da7f867e85d7df62cca15 /book/src/guides
parent37520f46ae891f77f81f4049cbb7dc2dbe2d5fc3 (diff)
rename '--fetch/build-grammars' flags into '--grammar fetch/build'
The old flags were a bit long. --grammar is also aliased to -g to make it even easier.
Diffstat (limited to 'book/src/guides')
-rw-r--r--book/src/guides/adding_languages.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/book/src/guides/adding_languages.md b/book/src/guides/adding_languages.md
index e000770c..e5fa456c 100644
--- a/book/src/guides/adding_languages.md
+++ b/book/src/guides/adding_languages.md
@@ -60,7 +60,7 @@ git repository:
| --- | ----------- |
| `git` | A git remote URL from which the grammar should be cloned |
| `rev` | The revision (commit hash or tag) which should be fetched |
-| `subpath` | A path within the grammar directory which should be built. Some grammar repositories host multiple grammars (for example `tree-sitter-typescript` and `tree-sitter-ocaml`) in subdirectories. This key is used to point `hx --build-grammars` to the correct path for compilation. When omitted, the root of repository is used |
+| `subpath` | A path within the grammar directory which should be built. Some grammar repositories host multiple grammars (for example `tree-sitter-typescript` and `tree-sitter-ocaml`) in subdirectories. This key is used to point `hx --grammar build` to the correct path for compilation. When omitted, the root of repository is used |
Or a `path` key with an absolute path to a locally available grammar directory.
@@ -79,7 +79,7 @@ the last matching query supersedes the ones before it. See
## Common Issues
-- If you get errors when running after switching branches, you may have to update the tree-sitter grammars. Run `hx --fetch-grammars` to fetch the grammars and `hx --build-grammars` to build any out-of-date grammars.
+- If you get errors when running after switching branches, you may have to update the tree-sitter grammars. Run `hx --grammar fetch` to fetch the grammars and `hx --grammar build` to build any out-of-date grammars.
- If a parser is segfaulting or you want to remove the parser, make sure to remove the compiled parser in `runtime/grammar/<name>.so`