aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-11-13 15:38:46 -0500
committerSantos Gallegos <stsewd@protonmail.com>2021-11-16 21:03:52 -0500
commitbc7fb7fe7fa17be851b4676688e3d738300094bb (patch)
treeb0d719b5cdde7ec1fe86bc2841340234296e6e70
parentDocs: update docs on how to override a query (diff)
downloadnvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar.gz
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar.bz2
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar.lz
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar.xz
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.tar.zst
nvim-treesitter-bc7fb7fe7fa17be851b4676688e3d738300094bb.zip
Just one line
-rw-r--r--README.md10
1 files changed, 3 insertions, 7 deletions
diff --git a/README.md b/README.md
index 5833021f8..9cb6c4c32 100644
--- a/README.md
+++ b/README.md
@@ -375,14 +375,10 @@ but if you want to extend a query use the `after/queries/` directory.
If you want to completely override a query, you can use `:h set_query()`.
For example, to override the `injections` queries from `c` with your own:
-```lua
--- On your init.lua
-require("vim.treesitter.query").set_query("c", "injections", "(comment) @comment")
-```
-
```vim
-" Or in your init.vim
-call v:lua.require("vim.treesitter.query").set_query("c", "injections", "(comment) @comment")
+lua <<EOF
+require("vim.treesitter.query").set_query("c", "injections", "(comment) @comment")
+EOF
```
Note: when using `set_query`, all queries in the runtime directories will be ignored.