LhKipp / tree-sitter-nu

A tree-sitter grammar for the nushell language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work in Neovim: Could not load parser for nushell - undefined symbol: tree_sitter_nushell

Hubro opened this issue · comments

No idea why, but the parser doesn't work with Neovim, possibly some version mismatch?

This error pops up when I open a .nu file:

Could not load parser for nushell: "Failed to load parser: uv_dlsym: /home/tomas/.local/share/nvim/lazy/nvim-treesitter/parser/nushell.so: undefined symbol: tree_sitter_nushell"


I installed it like this:

local configs = require("nvim-treesitter.parsers").get_parser_configs()

configs.nushell = {
  install_info = {
    url = "https://github.com/LhKipp/tree-sitter-nu.git",
    files = { "src/parser.c", "src/scanner.c" },
    branch = "main",
  },
  filetype = "nu",
}

Hi Hubro,

thanks for opening this issue.

I don't have the same issue. Looking at how you install the grammar and how I do via nvim-nu, the only difference is the index name.

- configs.nushell
+ configs.nu

Please try it out and let me know whether your issue persists.

That does indeed seem to have been the issue, seems the index must exactly match the parser name. Who knew! 😄