Closed kennethnym closed 2 months ago
I am having the same problem on neovim 0.10, macos 13.2, here's my checkhealth:
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 v14.19.3 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `clang` executable found. Selected from { "clang", "cc", "gcc", "clang", "cl", "zig" }
Version: clang version 16.0.6
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "arm64",
release = "22.3.0",
sysname = "Darwin",
version = "Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000"
} ~
Parser/Features H L F I J
- bash ✓ ✓ ✓ . ✓
- c ✓ ✓ ✓ ✓ ✓
- elixir ✓ ✓ ✓ ✓ ✓
- erlang ✓ . ✓ . .
- hcl ✓ . ✓ ✓ ✓
- heex ✓ ✓ ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- json ✓ ✓ ✓ ✓ .
- jsonnet ✓ ✓ ✓ . .
- julia ✓ ✓ ✓ ✓ ✓
- just ✓ ✓ ✓ ✓ ✓
- kconfig ✓ ✓ ✓ ✓ ✓
- kdl ✓ ✓ ✓ ✓ ✓
- kotlin ✓ ✓ ✓ . ✓
- koto ✓ ✓ ✓ . ✓
- lua x x x x x
- markdown x . x x x
- markdown_inline ✓ . . . ✓
- nix x x x . x
- python x x x x x
- query ✓ ✓ ✓ ✓ ✓
- toml x x x x x
- vim ✓ ✓ ✓ . ✓
- vimdoc x . . . ✓
- yaml x x x x 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 lua(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
lua(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/lua/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/dracula.nvim/after/queries/lua/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- ERROR lua(locals): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
lua(locals) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/lua/locals.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- ERROR lua(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
lua(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/lua/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- ERROR lua(indents): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
lua(indents) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/lua/indents.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- ERROR lua(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
lua(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/lua/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- ERROR markdown(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
markdown(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/dracula.nvim/after/queries/markdown/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
- ERROR markdown(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
markdown(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
- ERROR markdown(indents): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
markdown(indents) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/indents.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
- ERROR markdown(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
markdown(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'markdown': uv_dlopen: no error
- ERROR nix(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
nix(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/nix/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
- ERROR nix(locals): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
nix(locals) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/nix/locals.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
- ERROR nix(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
nix(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/nix/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
- ERROR nix(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
nix(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/nix/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'nix': uv_dlopen: no error
- ERROR python(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
python(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/python/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
- ERROR python(locals): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
python(locals) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/python/locals.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
- ERROR python(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
python(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/python/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
- ERROR python(indents): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
python(indents) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/python/indents.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
- ERROR python(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
python(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/python/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'python': uv_dlopen: no error
- ERROR toml(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
toml(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/toml/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
- ERROR toml(locals): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
toml(locals) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/toml/locals.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
- ERROR toml(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
toml(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/toml/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
- ERROR toml(indents): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
toml(indents) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/toml/indents.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
- ERROR toml(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
toml(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/toml/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'toml': uv_dlopen: no error
- ERROR vimdoc(highlights): ...d-0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid node type "delimiter":
(delimiter) @markup.heading.1
^
vimdoc(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/vimdoc/highlights.scm", failed to load: ...d-0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid node type "delimiter":
(delimiter) @markup.heading.1
^
- ERROR yaml(highlights): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
yaml(highlights) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/yaml/highlights.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
- ERROR yaml(locals): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
yaml(locals) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/yaml/locals.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
- ERROR yaml(folds): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
yaml(folds) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/yaml/folds.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
- ERROR yaml(indents): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
yaml(indents) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/yaml/indents.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
- ERROR yaml(injections): ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
yaml(injections) is concatenated from the following files:
| [ERROR]:"/Users/firework/.local/share/nvim/lazy/nvim-treesitter/queries/yaml/injections.scm", failed to load: ....10.0/share/nvim/runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'yaml': uv_dlopen: no error
This is almost certainly a compiler issue. However, the compiler reported in checkhealth looks correct (as in, not a known problematic version like ancient gcc or clang 16).
Can you
afaik cc
, gcc
, clang
and the likes are symlinked to apple clang, so it is definitely picking up the correct compiler as there is only one compiler.
i also went ahead and make
d tree-sitter-typescript. here is the output:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C typescript all
cc -Isrc -std=c11 -fPIC -c -o src/parser.o src/parser.c
cc -Isrc -std=c11 -fPIC -c -o src/scanner.o src/scanner.c
ar rv libtree-sitter-typescript.a src/parser.o src/scanner.o
ar: creating archive libtree-sitter-typescript.a
a - src/parser.o
a - src/scanner.o
cc -dynamiclib -Wl,-install_name,/usr/local/lib/libtree-sitter-typescript.0.dylib,-rpath,@executable_path/../Frameworks src/parser.o src/scanner.o -o libtree-sitter-typescript.dylib
sed -e 's|@URL@|https://github.com/tree-sitter/tree-sitter-typescript|' \
-e 's|@VERSION@|0.21.1|' \
-e 's|@LIBDIR@|/usr/local/lib|' \
-e 's|@INCLUDEDIR@|/usr/local/include|' \
-e 's|@REQUIRES@||' \
-e 's|@ADDITIONAL_LIBS@||' \
-e 's|=/usr/local|=${prefix}|' \
-e 's|@PREFIX@|/usr/local|' ../bindings/c/tree-sitter-typescript.pc.in > tree-sitter-typescript.pc
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tsx all
cc -Isrc -std=c11 -fPIC -c -o src/parser.o src/parser.c
cc -Isrc -std=c11 -fPIC -c -o src/scanner.o src/scanner.c
ar rv libtree-sitter-tsx.a src/parser.o src/scanner.o
ar: creating archive libtree-sitter-tsx.a
a - src/parser.o
a - src/scanner.o
cc -dynamiclib -Wl,-install_name,/usr/local/lib/libtree-sitter-tsx.0.dylib,-rpath,@executable_path/../Frameworks src/parser.o src/scanner.o -o libtree-sitter-tsx.dylib
sed -e 's|@URL@|https://github.com/tree-sitter/tree-sitter-typescript|' \
-e 's|@VERSION@|0.21.1|' \
-e 's|@LIBDIR@|/usr/local/lib|' \
-e 's|@INCLUDEDIR@|/usr/local/include|' \
-e 's|@REQUIRES@||' \
-e 's|@ADDITIONAL_LIBS@||' \
-e 's|=/usr/local|=${prefix}|' \
-e 's|@PREFIX@|/usr/local|' ../bindings/c/tree-sitter-tsx.pc.in > tree-sitter-tsx.pc
it seems like it is using cc
as the compiler, which is what was reported in :checkhealth
.
to address your second point, i have xcode 15.3 installed.
Well, there could be more than one compiler installed even if they're all Apple's.
Can you download the command line tools and switch to those, just to test? (And you should build a typescript.so
so you can test it with Neovim; probably the lua parser would be easier for that purpose.)
if i have xcode installed, i automatically have the command line tools installed as xcode uses those. xcode-select --install
indeed reported that i already have the tools installed.
i can verify cc
and all others is using the same clang
:
$ cc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
i tried to build and use the treesitter lua parser as suggested, but nvim crashes immediately when i open any lua file
Yes, but I am asking you to download and install the latest stand-alone tools for the sake of testing.
the only way i can "download and install the latest stand-alone tools" is to update xcode as xcode contains them. i updated my xcode to 15.4 and it did not update the compiler version at all. 15.4 is the latest and greatest i can get, and it is still on clang 15.
You can download the CLT from the Apple Developer website, or via xcode-select --install
.
as i have previously stated, xcode-select --install
reported that i have them installed. if i have xcode installed, it is automatically installed and included because it is part of the package.
Sigh. I know you have a compiler installed; this is not what this is about. For some reason, the compiler on your system is not generating a valid library and I am trying to find out why. One part of this is testing a different compiler, namely a stand-alone CLT installation.
If you are not willing to help investigate this problem, there is nothing I can do to help you.
$ xcode-select install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
do you want me to install xcode 16 CLI beta? i cannot install two copies of the same compiler on the same version. if you want to install something else other than clang, then i can definitely do that.
it appears that there is some misunderstanding between us. i see no reason why you are getting agitated.
No, I am asking you to download the XCode 15.3 Command Line Tools from the Apple Developer website. (You can absolutely have multiple different versions installed; you can switch between them with XCode settings or the xcode-select
tool.)
If you already have the CLT installed, that could be an issue. What does xcode-select -p
print?
Other things we need to look at is your terminal (is it native M1?) and your environment variables.
i downloaded xcode 15.3 command line tool as you suggested, and it is reporting the same clang version as the one included in xcode.
15.3 cli clang:
./clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin/.
xcode clang (which is the same because xcode embeds command line tools):
$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
as you can see, xcode embeds command line tool as part of the package - standalone cli is equivalent to the one included in xcode.
xcode-select -p
:
/Applications/Xcode.app/Contents/Developer
i am on an m1 pro macbook pro, and i use wezterm as my terminal. please let me know what environment variables you need specifically, and i will report them.
indeed, i tried to:
xcode-select -s /Library/Developer/CommandLineTools
and then re-compiled the lua parser again and copied the resulting lua.so
file into the corresponding directory, and nvim
still crashes when i open any lua file.
just fyi the same issue persists with other terminal emulators (including the built-in terminal) and even gui neovim wrappers (e.g. goneovim which i actually use)
Ok, let's take another step back, then.
Please use a terminal. (Apple Terminal is crap but will do for the nonce. Make sure it's not running under Rosetta 2.) No GUIs!
What does env
show there?
Download the latest release (not nightly) from neovim/neovim and unpack this somewhere.
save the following somewhere under test.lua
:
local nvimts = '/tmp/nvim-treesitter'
vim.system {
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/nvim-treesitter/nvim-treesitter.git',
nvimts
}:wait()
vim.opt.runtimepath:prepend(nvimts)
require('nvim-treesitter.configs').setup({})
run (from the downloaded release!) bin/nvim --clean -u test.lua
(adjust paths to fit)
:TSInstallSync lua
:checkhealth nvim-treesitter
reported env
:
COLORTERM=truecolor
COMMAND_MODE=unix2003
HOME=/Users/kenneth
LANG=en_GB.UTF-8
LOGNAME=kenneth
LaunchInstanceID=30F487B8-E3F8-4205-85CD-FDD2393EBCB9
PATH=/Users/kenneth/Library/pnpm:/Users/kenneth/.bun/bin:/Users/kenneth/.rbenv/shims:/Users/kenneth/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/kenneth/.nvm/versions/node/v20.11.1/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/Users/kenneth/.cargo/bin:/Users/kenneth/Library/Android/sdk/platform-tools:/Users/kenneth/Library/Android/sdk/emulator:/Users/kenneth/flutter/bin:/Users/kenneth/flutter/.pub-cache/bin:/Users/kenneth/Library/Application Support/JetBrains/Toolbox/scripts:/Users/kenneth/flatc:/Users/kenneth/go/bin:/Users/kenneth/Tools/bin:/Users/kenneth/.local/bin:/Users/kenneth/.orbstack/bin:/Users/kenneth/.spicetify:/Users/kenneth/.local/bin
SECURITYSESSIONID=186b3
SHELL=/bin/zsh
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Znu3HPSxY9/Listeners
TERM=xterm-256color
TERM_PROGRAM=WezTerm
TERM_PROGRAM_VERSION=20240203-110809-5046fc22
TMPDIR=/var/folders/cs/08tczxdd2tbdfhgfr3b68p4c0000gn/T/
USER=kenneth
WEZTERM_CONFIG_DIR=/Users/kenneth
WEZTERM_CONFIG_FILE=/Users/kenneth/.wezterm.lua
WEZTERM_EXECUTABLE=/Applications/WezTerm.app/Contents/MacOS/wezterm-gui
WEZTERM_EXECUTABLE_DIR=/Applications/WezTerm.app/Contents/MacOS
WEZTERM_PANE=0
WEZTERM_UNIX_SOCKET=/Users/kenneth/.local/share/wezterm/gui-sock-81802
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
__CFBundleIdentifier=com.github.wez.wezterm
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x2
SHLVL=1
PWD=/Users/kenneth
OLDPWD=/Users/kenneth
ANDROID_HOME=/Users/kenneth/Library/Android/sdk
NVM_DIR=/Users/kenneth/.nvm
NVM_CD_FLAGS=-q
NVM_BIN=/Users/kenneth/.nvm/versions/node/v20.11.1/bin
NVM_INC=/Users/kenneth/.nvm/versions/node/v20.11.1/include/node
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
PYENV_ROOT=/Users/kenneth/.pyenv
PYENV_SHELL=zsh
ZSH=/Users/kenneth/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
RBENV_SHELL=zsh
BUN_INSTALL=/Users/kenneth/.bun
JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
STARSHIP_SHELL=zsh
STARSHIP_SESSION_KEY=3983326692149559
PNPM_HOME=/Users/kenneth/Library/pnpm
_=/usr/bin/env
checkhealth after following your instructions:
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- OK `tree-sitter` found 0.22.6 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v20.11.1 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "arm64",
release = "23.4.0",
sysname = "Darwin",
version = "Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000"
} ~
Parser/Features H L F I J
- bash ✓ ✓ ✓ . ✓
- c ✓ ✓ ✓ ✓ ✓
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- python ✓ ✓ ✓ ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc 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 vimdoc(highlights): ...m/0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid node type "delimiter":
(delimiter) @markup.heading.1
^
vimdoc(highlights) is concatenated from the following files:
| [ERROR]:"/tmp/nvim-treesitter/queries/vimdoc/highlights.scm", failed to load: ...m/0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid node type "delimiter":
(delimiter) @markup.heading.1
^
Well, so that worked. That means the issue is somewhere with the config. I'm afraid there's nothing for it than going through it step by step and comparing each difference to the minimal, working, config to find the culprit.
You can (and should) also repeat this (after removing the tmp
directory) with your installed Neovim. Depending on where you got it from, it could also be the culprit.
Thanks for pointing me at the compiler. I am learning nix (and playing around with home-manager) so its frustrating when these sorts of issues (system vs nix compiler) crop up. Here's how I fixed it:
I basically pointed the treesitter compiler at the right gcc. With this change my checkhealth reports the gcc in nix store as the compiler and I don't see those uv_dlopen errors.
thanks for the help, i will try to reinstall everything and go through my config. closing this for now.
Got the same error on a very similar setup (MacOS 22.3.0, neovim 0.10.0, clang version 14.0.3). I only noticed that today on attempt to install new parsers. Reinstalling treesitter led to having this error on all parsers. @kennethnym did you find any solution for this?
UPD: the problem lies within enabling rosetta2 support for my terminal. I went back to a terminal without rosetta2 support and with arm64 processor architecture, reinstalled treesitter again and it works now.
Describe the bug
about a week ago, my syntax highlighting for every language (go, json, ts, dockerfile, etc.) randomly went away. i suspected it might be due to plugin updates (even though since the last time i updated plugins syntax highlighting was working just fine for about a week), so i nuked my whole nvim setup (including uninstalling the binary) and installed everything from scratch again. treesitter highlighting worked fine for a while, until all of a sudden "uv_dlopen: no error" started to appear for a random parser, then it would start propagating to other parsers as well. right now, some parsers work, and some don't
i tried to reinstall everything multiple times, but i have not been able to track down what specific parser is causing this error.
what i have attempted to debug the issue:
:checkhealth
: a slew ofuv_dlopen: no error
messages for random parsers:checkhealth nvim-treesitter
: same error messages:TSUpdate
: would report that all parsers are up to date:TSUninstall all
then:TSInstall all
: some parser installation would fail withuv_dlopen: no error
:TSUninstall <failed-parser>
then:TSInstall <failed-parser>
: installed successfully but would reportuv_dlopen: no error
:messages
: would regurgitate all previous errorsneither using stable nvim nor master nvim fixed the issue
To Reproduce
Expected behavior
no error message and syntax highlighting works normally
Output of
:checkhealth nvim-treesitter