Closed ibhagwan closed 2 years ago
Can you share the queries you are using? It seems they might be outdated.
(Btw table support is taking some time, but now with the split grammars I'm kinda getting there)
Can you share the queries you are using? It seems they might be outdated.
This also happens with my vimdoc generation script that downloads a new instance of the nightly/treesitter and parsers, so I would assume it also downloads the latest scm
file.
(Btw table support is taking some time, but now with the split grammars I'm kinda getting there)
That would be amazing :)
Hm, the scm
files from this repo or the ones from nvim-treesitter? The ones here use slightly different capture names (ones compatible with https://github.com/tree-sitter/tree-sitter/tree/master/highlight) which are not compatible with neovim. But the error you are getting is suggesting that the query contains a node that is not part of the grammar. So I don't think that's the problem.
I would guess that the scm
files are outdated. They should be up to date with the ones in nvim-treesitter. You can check them with :TSEditQuery highlights markdown
/ :TSEdirQueryUserAfter highlights markdown
. Maybe it's also a problem with the injections
query file instead of highlights
.
Hm, the
scm
files from this repo or the ones from nvim-treesitter? The ones here use slightly different capture names (ones compatible with https://github.com/tree-sitter/tree-sitter/tree/master/highlight) which are not compatible with neovim. But the error you are getting is suggesting that the query contains a node that is not part of the grammar. So I don't think that's the problem.
I was using the default that comes with nvim-treesitter
, I just tried two different troublehsooting steps:
injections
and highlights
from this plugin and placed them inside .config/nvim/after/queries/markdown
nvim-treesitter
query file under .local/share/nvim/site/pack/packer/opt/nvim-treesitter/queries/markdown
with the file frm this repo, this is the diff:
Both fail with the exact same error, contents of the markdown doesn't seem to matter the call to get_string_parser
always fails.
Hm, do you have (tree-sitter playground)[https://github.com/nvim-treesitter/playground] installed? If so what does it output if you open a markdown file with content
test
?
(Maybe you need to run :TSBufDisable highlights
and :TSBufDisable injections
so you don't get any errors)
Hm, do you have tree-sitter playground, If so what does it output if you open a markdown file with content.
I do have playground installed, I also have this configured in my nvim-treesitter, and pressing <CR>
to start the incremental selection would fail with the same error only inside a markdown file.
require'nvim-treesitter.configs'.setup {
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<CR>',
node_incremental = '<CR>',
node_decremental = '<S-Tab>',
scope_incremental = '<Tab>',
},
},
...
I also have good news, I just updated nvim-treesitter
again and everyhing works again, I guess it was an issue with nvim-treesitter
.
Hi again @MDeiml,
I seem to encounter a new error when using the
markdown
parser with the nightly, usingget_string_parser
fails:With error: