rest-nvim / tree-sitter-http

HTTP grammar for tree-sitter
MIT License
34 stars 17 forks source link

Got failure when using latest nvim-treesitter when calling :checkhealth nvim-treesitter #14

Closed pdckxd closed 8 months ago

pdckxd commented 1 year ago

neovim version: v0.9.0 nvim-treesitter version: commit ab3fb2a

What I did:

  1. :TSUninstall http
  2. :TSInstall http
nvim-treesitter: require("nvim-treesitter.health").check()

Installation
- OK tree-sitter found 0.20.7 (parser generator, only needed for :TSInstallFromGrammar)
- OK node found v18.12.1 (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.

OS Info:
{
  machine = "x86_64",
  release = "5.15.0-52-generic",
  sysname = "Linux",
  version = "#58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022"
}

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - cmake               ✓ . ✓ . .
  - cpp                 ✓ ✓ ✓ ✓ ✓
  - dart                ✓ ✓ ✓ ✓ ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - http                x . . . ✓
  - java                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - kotlin              ✓ ✓ ✓ . ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - make                ✓ . ✓ . ✓
  - php                 ✓ ✓ ✓ ✓ ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - v                   ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - zig                 ✓ . ✓ ✓ ✓

  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 http(highlights): /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 4 for language http
  http(highlights) is concatenated from the following files:
  | [ERROR]:"/home/user/.local/share/nvim/lazy/nvim-treesitter/queries/json/highlights.scm", failed to load: /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 4 for language http
  |    [OK]:"/home/user/.local/share/nvim/lazy/nvim-treesitter/queries/http/highlights.scm"
pdckxd commented 1 year ago

After applying workaround from https://github.com/rest-nvim/tree-sitter-http/issues/11#issuecomment-1528986381, the error is gone. Seems that issue finally fix the problem, not sure why I still hit the failure on TOT master branch of nvim-treesitter.