diff options
| author | Luis Carlos Cruz Carballo <lcruzc@linkux-it.com> | 2020-11-30 21:30:07 -0400 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2020-12-09 19:11:41 +0100 |
| commit | 76486942e79973095795e8699f95bb509e063d0d (patch) | |
| tree | 28cf4ff15c1c67e7f125be5a211b46674e3bba2b /README.md | |
| parent | a47c83d12d9ba835c7ec59b2d498078850e4703f (diff) | |
Allow user configure parsers using metatables
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |
