aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-11-16 21:58:58 -0500
committerStephan Seitz <stephan.seitz@fau.de>2021-11-20 17:32:50 +0100
commitb784ca7fcad3b2bf83e79432a35acf11e5fad5fd (patch)
treeac7cd82c2c9a4efb96bcc041089b3574509fee36
parentr add new highlights (diff)
downloadnvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar.gz
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar.bz2
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar.lz
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar.xz
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.tar.zst
nvim-treesitter-b784ca7fcad3b2bf83e79432a35acf11e5fad5fd.zip
Add `query error: invalid node type at position` to the troubleshooting section
We have had many of these recently...
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml3
-rw-r--r--README.md11
2 files changed, 13 insertions, 1 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index d770c35f8..37dbce22c 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -14,6 +14,8 @@ body:
required: true
- label: I have run `:TSUpdate`
required: true
+ - label: I have read the [troubleshooting section](https://github.com/nvim-treesitter/nvim-treesitter#troubleshooting)
+ required: true
- type: textarea
attributes:
@@ -57,4 +59,3 @@ body:
attributes:
label: Additional context
description: Add any context about the problem here.
-
diff --git a/README.md b/README.md
index 9cb6c4c32..e177d21a9 100644
--- a/README.md
+++ b/README.md
@@ -470,6 +470,17 @@ Try updating the parser that you suspect has changed (`:TSUpdate {language}`) or
If the error persists after updating all parsers,
please [open an issue](https://github.com/nvim-treesitter/nvim-treesitter/issues/new/choose).
+#### I get `query error: invalid node type at position`
+
+This could be due a query file outside this plugin using outdated nodes,
+or due to an outdated parser.
+
+- Make sure you have the parsers up to date with `:TSUpdate`
+- Make sure you don't have more than one `parser` runtime directory.
+ You can execute this command `:echo nvim_get_runtime_file('parser', v:true)` to find all runtime directories.
+ If you get more than one path, remove the ones that are outside this plugin (`nvim-treesitter` directory),
+ so the correct version of the parser is used.
+
#### I experience weird highlighting issues similar to [#78](https://github.com/nvim-treesitter/nvim-treesitter/issues/78)
This is a well known issue, which arises when the tree and the buffer have gotten out of sync.