diff options
| author | Carlo Sala <carlosalag@protonmail.com> | 2022-02-06 19:10:46 +0100 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2022-02-06 20:22:44 +0100 |
| commit | 726d9be3aa39a971fce7dd63bfbbfdc4f2605db2 (patch) | |
| tree | 7b8bc9742e20b280a8624e4eb085ecdece953a72 | |
| parent | fix: Allow re-parsing in Python, XFAIL `\` indentation test (diff) | |
| download | nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar.gz nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar.bz2 nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar.lz nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar.xz nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.tar.zst nvim-treesitter-726d9be3aa39a971fce7dd63bfbbfdc4f2605db2.zip | |
fix: readme typo, removing deprecated docs
| -rw-r--r-- | README.md | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -361,10 +361,11 @@ EOF ``` If you wish to set a specific parser for a filetype, you should extend the `filetype_to_parsername` table: + ```vim lua <<EOF -local ft_to_parser = require"nvim-treesitter.parser".filetype_to_parsername -filetype_to_parsername.someft = "python" -- the someft filetype will use the python parser and queries. +local ft_to_parser = require"nvim-treesitter.parsers".filetype_to_parsername +ft_to_parser.someft = "python" -- the someft filetype will use the python parser and queries. EOF ``` @@ -382,19 +383,6 @@ See [Neovim's documentation](https://neovim.io/doc/user/filetype.html#new-filety If you use a git repository for your parser and want to use a specific version, you can set the `revision` key in the `install_info` table for you parser config. -## 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 information from the syntax tree; |
