diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-07-05 09:30:49 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-05 09:30:49 +0200 |
| commit | f197ce27d91b4a2920b51a7ae0140acd294bf319 (patch) | |
| tree | 414a595e1bf64c6eeadcd232231e1cbbdd4a1d79 /README.md | |
| parent | fix(html): correct the link label highlight (#6866) (diff) | |
| download | nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar.gz nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar.bz2 nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar.lz nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar.xz nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.tar.zst nvim-treesitter-f197ce27d91b4a2920b51a7ae0140acd294bf319.zip | |
docs(readme): update outdated information
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -105,8 +105,8 @@ All modules are disabled by default and need to be activated explicitly in your ```lua require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, + -- A list of parser names, or "all" (the listed parsers MUST always be installed) + ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, @@ -635,18 +635,18 @@ like the `queries` folder of this plugin, e.g. `queries/{language}/{locals,highl Other modules may require additional queries such as `folding.scm`. You can find a list of all supported capture names in [CONTRIBUTING.md](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations). -All queries found in the runtime directories will be combined. -By convention, if you want to write a query, use the `queries/` directory, -but if you want to extend a query use the `after/queries/` directory. +The first query file on `runtimepath` will be used (see `:h treesitter-query`). +If you want to make a query on the user config extend other queries instead of +replacing them, see `:h treesitter-query-modeline-extends`. -If you want to completely override a query, you can use `:h set_query()`. +If you want to completely override a query, you can use `:h vim.treesitter.query.set()`. For example, to override the `injections` queries from `c` with your own: ```lua -require("vim.treesitter.query").set_query("c", "injections", "(comment) @comment") +vim.treesitter.query.set("c", "injections", "(comment) @comment") ``` -Note: when using `set_query`, all queries in the runtime directories will be ignored. +Note: when using `query.set()`, all queries in the runtime directories will be ignored. ## Adding modules |
