undefined symbol: tree_sitter_nu_external_scanner_create
lay-z opened this issue Β· comments
After trying to manually install tree-sitter-nu i get this error:
indent-blankline: Failed to load parser for language 'nu': uv_dlopen: /home/layz/.local/share/lunarvim/site/pack/lazy/opt/nvim-treesitter/parser/nu.so: undefined symbol: tree_sitter_nu_external_scanner_create
I don't know if thats because of an incorrect installation or if there's something not quite right with tree-sitter-nu plugin
My config file is set up as follows:
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.nu = {
install_info = {
url = "https://github.com/LhKipp/tree-sitter-nu", -- local path or git repo
files = { "src/parser.c" }, -- note that some parsers also require src/scanner.c or src/scanner.cc
-- optional entries:
branch = "main", -- default branch in case of git repo if different from master
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
},
filetype = "nu", -- if filetype does not match the parser name
}
I've installed the parser with TSInstall nu
. And i've even tried TSInstallFromGrammer nu
. But both don't give me any luck.
Please help π
Output of :checkhealth nvim-treesitter
==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.20.8 (d4c1bf7ce78051b7f4a381d1508d68928512ed5f) (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v18.16.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: cc (GCC) 13.2.1 20230801
- 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 = "6.4.10-arch1-1",
sysname = "Linux",
version = "#1 SMP PREEMPT_DYNAMIC Fri, 11 Aug 2023 11:03:36 +0000"
} ~
Parser/Features H L F I J
- bash β β β . β
- comment β . . . .
- dockerfile β . . . β
- html β β β β β
- json β β β β .
- lua β β β β β
- markdown β . β . β
- markdown_inline β . . . β
- nu . . . . .
- python β β β β β
- regex β . . . .
- toml β β β β β
- vimdoc β . . . β
- yaml β β β β β
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} ~
Hi lay-z,
have you set the filetype of config.nu
to be nu
?
Have you seen https://github.com/lhKipp/nvim-nu. It's a plugin which sets up this grammar and makes it all work.
When i run :set filetype?
it returns filetype=nu
but still no highlighting. Maybe i'll checkout nvim-nu, perhaps will work better for me π
nvim-nu worked for me! thanks @LhKipp