aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorChristian Clason <christian.clason@uni-due.de>2020-11-21 19:38:30 +0100
committerThomas Vigouroux <tomvig38@gmail.com>2020-11-25 22:35:20 +0100
commit7a9b48fa4e13da06020f95d696d7b2fc6d404474 (patch)
tree5c9bc313a668674f9c043c26036789494001f78f /README.md
parentexplain how to add unsupported parsers (diff)
downloadnvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar.gz
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar.bz2
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar.lz
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar.xz
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.tar.zst
nvim-treesitter-7a9b48fa4e13da06020f95d696d7b2fc6d404474.zip
expand explanation of TSUpdate
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index a593dfab7..92fa742b0 100644
--- a/README.md
+++ b/README.md
@@ -75,11 +75,10 @@ provides commands to automate this process:
- `TSInstallInfo` to know which parsers are available and installed.
- `TSInstall {language}` to install one or more parsers from a generated `c` file. (This requires a `C` compiler in your path.)
- `TSInstallFromGrammar {language}` to install one or more parsers from the original `grammar.js`. (In addition to a `C` compiler, this requires the `tree-sitter-cli` executable in your path; see https://tree-sitter.github.io/tree-sitter/creating-parsers#installation for installation instructions.)
-- `TSUpdate` to update already installed parsers
-`TSInstall <tab>`, `TSInstallFromGrammar <tab>`, and `TSUpdate <tab>` will give you a list of supported languages, or select `all` to install/update them all.
+`TSInstall <tab>` and `TSInstallFromGrammar <tab>` will give you a list of supported languages; you can also use `TSInstall all` to install every parser on the list.
-If your language is not yet included in the supported list, you can add it locally as follows:
+If your language is not yet included in this list, you can add it locally as follows:
1. Clone the repository or [create a new project](https://tree-sitter.github.io/tree-sitter/creating-parsers#project-setup) in, say, `~/projects/tree-sitter-zimbu`.
2. Run `tree-sitter generate` in this directory (followed by `tree-sitter test`, for good measure).
@@ -102,6 +101,8 @@ parser_config.zimbu = {
Note that this only installs the parser itself; using it for, e.g., highlighting also requires corresponding queries that need to be written and placed in the appropriate directory (e.g., as `queries/zimbu/highlights.scm`).
+Once a parser is installed, you can update it via `TSUpdate {language}`. If the parser is supported, this will checkout and install the revision specified in `nvim-treesitter`'s `lockfile.json`; otherwise it will use the latest revision of the repo or directory given in the `url` field above. Like `TSInstall`, you can get a list of possible arguments with `TSUpdate <tab>` or update every installed parser with `TSUpdate all` (or just `TSUpdate` for short).
+
## Setup
All modules are disabled by default,