Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim nix tree-sitter grammar doesn't work #187834

Closed
Tungsten842 opened this issue Aug 22, 2022 · 3 comments
Closed

Neovim nix tree-sitter grammar doesn't work #187834

Tungsten842 opened this issue Aug 22, 2022 · 3 comments
Labels
0.kind: bug Something is broken 6.topic: vim 9.needs: upstream fix This PR needs upstream to change something

Comments

@Tungsten842
Copy link
Member

Describe the bug

Nix grammar isn't working, there is no highlighting at all.

Steps To Reproduce

Steps to reproduce the behavior:
Open a .nix file in neovim

Additional context

Inside :checkhealth

  - ERROR: nix(highlights): ...ed-0.7.2/share/nvim/runtime/lua/vim/treesitter/query.lua:172: query: invalid node type at position 268
    nix(highlights) is concatenated from the following files:
    | [ERROR]:"/nix/store/7chxpc59yrihgwz7h5ghg5kqyaz3s0b1-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/nix/highlights.scm", failed to load: ...ed-0.7.2/share/nvim/runtime/lua/vim/treesitter/query.lua:172: query: invalid node type at position 268
  - ERROR: nix(locals): ...ed-0.7.2/share/nvim/runtime/lua/vim/treesitter/query.lua:172: query: invalid node type at position 16
    nix(locals) is concatenated from the following files:
    | [ERROR]:"/nix/store/7chxpc59yrihgwz7h5ghg5kqyaz3s0b1-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/nix/locals.scm", failed to load: ...ed-0.7.2/share/nvim/runtime/lua/vim/treesitter/query.lua:172: query: invalid node type at position 16
  - ERROR: nix(folds): ...ed-0.7.2/share/nvim/runtime/lua/vim/treesitter/query.lua:172: query: invalid node type at position 86

Notify maintainers

@Profpatsch @oxalica

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.60-xanmod1, NixOS, 22.11 (Raccoon), 22.11pre402057.13711c9ab9f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.10.3`
 - channels(root): `"home-manager, nixos"`
 - channels(quantmint): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@Tungsten842 Tungsten842 added the 0.kind: bug Something is broken label Aug 22, 2022
@06kellyjac 06kellyjac added the 9.needs: upstream fix This PR needs upstream to change something label Aug 23, 2022
@06kellyjac
Copy link
Member

Since this is an upstream problem I will close this in nixpkgs

tracked by: nix-community/tree-sitter-nix#27

@Tungsten842
Copy link
Member Author

Tungsten842 commented Aug 25, 2022

@06kellyjac I don't think that this is an upstream problem.
Installing the nix grammar with, :TSinstall nix works.

@06kellyjac
Copy link
Member

upstream tree-sitter-nix, not nvim-treesitter or tree-sitter/tree-sitter

The error you post is essentially identical to the error in that issue, I'm still not convinced this is an issue with how nixpkgs is packaging tree-sitter-nix

What version of nvim-treesitter are you using and what version of the grammar did it grab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: vim 9.needs: upstream fix This PR needs upstream to change something
Projects
None yet
Development

No branches or pull requests

3 participants