summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLuis Carlos Cruz Carballo <lcruzc@linkux-it.com>2020-11-30 21:30:07 -0400
committerKiyan <yazdani.kiyan@protonmail.com>2020-12-09 19:11:41 +0100
commit76486942e79973095795e8699f95bb509e063d0d (patch)
tree28cf4ff15c1c67e7f125be5a211b46674e3bba2b /README.md
parenta47c83d12d9ba835c7ec59b2d498078850e4703f (diff)
Allow user configure parsers using metatables
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 03466ba0..ba3b45a7 100644
--- a/README.md
+++ b/README.md
@@ -275,6 +275,19 @@ EOF
You can also skip step 2 and use `:TSInstallFromGrammar zimbu` to install directly from a `grammar.js` in the top-level directory specified by `url`.
Once the parser is installed, you can update it (from the latest revision of the `main` branch if `url` is a Github repository) with `:TSUpdate zimbu`.
+## Update parsers used_by
+
+Sometimes needs to use some parser for different filetype.
+
+Add the following snippet to your `init.vim`:
+
+```vim
+lua <<EOF
+local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
+parser_config.typescript.used_by = "javascriptflow"
+EOF
+```
+
## Adding queries
Queries are what `nvim-treesitter` uses to extract informations from the syntax tree; they are