nvim-neorg/tree-sitter-norg

Error in query

sbmueller opened this issue · 2 comments

Hi, I experience the following errors when opening any .norg file and during :checkhealth nvim-treesitter:

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  - OK: `node` found v10.19.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
...
  - norg           x . ✓ . ✓
...

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

## The following errors have been detected:
  - ERROR: norg(highlights): /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:218: query: invalid field at position 7227 for language norg
    norg(highlights) is concatenated from the following files:
    | [ERROR]:"/home/[username]/.local/share/nvim/plugged/neorg/queries/norg/highlights.scm", failed to load: /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:218: query: invalid field at position 7227 for language norg

If I run TSUpdate norg as suggested, I get the info "Parsers are up-to-date!". Tried with neovim 0.7.2 and 0.8.0-dev. I'm using neorg 0.0.12. Any idea what is the issue?

Hey, sorry for the late reply. Could you try updating Neorg to the latest branch? Perhaps I broke something without realizing. If your setup works on main but doesn't on 0.0.12 then I'll start bug hunting :)

Hi @vhyrro , I was using neorg 0.0.12 because of this information: nvim-neorg/neorg#559 (comment)

In the meantime, neovim 0.8.0 was released, which allowed me to update neorg to main as well. There, the issue is resolved. Thanks!