From 7a9b48fa4e13da06020f95d696d7b2fc6d404474 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 21 Nov 2020 19:38:30 +0100 Subject: expand explanation of TSUpdate --- README.md | 7 ++++--- 1 file 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 `, `TSInstallFromGrammar `, and `TSUpdate ` will give you a list of supported languages, or select `all` to install/update them all. +`TSInstall ` and `TSInstallFromGrammar ` 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 ` or update every installed parser with `TSUpdate all` (or just `TSUpdate` for short). + ## Setup All modules are disabled by default, -- cgit v1.2.3-70-g09d2