Closed pwntester closed 4 years ago
Im getting this error:
Error executing vim.schedule lua callback: ...m/HEAD-05fd647/share/nvim/runtime/lua/vim/treesitter.lua:128: query: invalid field at position 10
Where query is ((varDecl varName: (simpleId) @def @v) @declaration)
, so it seems there is a problem with varName
field. According to parser grammar, varName
is a SYMBOL:
"varDecl": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "typeExpr"
},
{
"type": "SYMBOL",
"name": "varName"
}
]
},
I rewrote the query as ((varDecl (simpleId) @def @v) @declaration)
and Im not getting the error anymore, but I dont get the var declaration highlighted neither
finally got it working, the problem was sillier than that, I was not adding ql
file type to the CursorHold autocommand in completion-treesitter.vim
Im trying to add support for https://github.com/tree-sitter/tree-sitter-ql
so far added a
ql.vim
file toafter/ftplugin
with:Im not really familiar with tree-sitter, but looking at tree-sitter web-ui, it seems correct to me:
BTW, how can I run the query on the query window?
Thanks!