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

Error executing lua Failed to load parser: uv_dlopen: cpp.so is not a valid Win32 application. #1985

Closed
3 tasks done
17Swagat opened this issue Nov 6, 2021 · 20 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@17Swagat
Copy link

17Swagat commented Nov 6, 2021

Before reporting

  • I have updated my neovim version to latest master
  • I have updated my plugin to the latest version
  • I have run :TSUpdate

Describe the bug

When ever try to open my .cpp file which contains Win32 code in it with neovide (or nvim) from command-prompt or any other .cpp file I get an error saying:
"Error_ detected while processing FileType Autocommands for "*":
E5108: Error executing lua Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application."

pics:->
error1

and there is no syntax highlighting for the Win32 api code.

pics:->

f1

f2

f5

But when I do the same thing from Cmder or Git (I use neovide. Since nvim do not works properly with cmder) I get No-Errors and also get a proper syntax highlighting for the code.

pics:->
g1

g2

g3

To Reproduce

  1. Open the file contaning Win32 (or C++) code with Neovide (or nvim) from Command prompt to get the following error and no syntax highlighting for the Win32 code.
  2. Open the file contaning Win32 (or C++) code with Neovide from Cmder or Git to get the following error and no syntax highlighting for the Win32 code.

Expected behavior

I Expect that the neovim and neovide to show me proper syntax highlighting for my Win32 code and no errors like the following. I want the same behaviour when I open the file with Neovide and Neovim from Command prompt, just like when I do the same thing from Cmder Or Git.

Output of :checkhealth nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found  0.20.0 (e85a279cf29da1b08648e27214dda20a841e57c8) (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v16.6.2 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `gcc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
  - python         x x x x x 
  - rust           ✓ ✓ ✓ ✓ ✓ 
  - gomod          ✓ . . . . 
  - graphql        ✓ . . ✓ ✓ 
  - ruby           x x x x x 
  - perl           x . . . . 
  - bash           x x x . x 
  - fish           ✓ ✓ ✓ ✓ ✓ 
  - php            x x x x x 
  - java           ✓ ✓ . ✓ ✓ 
  - rst            ✓ ✓ . . ✓ 
  - fennel         ✓ ✓ . . ✓ 
  - html           x x x x x 
  - teal           ✓ ✓ ✓ ✓ ✓ 
  - julia          ✓ ✓ ✓ ✓ ✓ 
  - ql             ✓ ✓ . ✓ ✓ 
  - json           ✓ ✓ ✓ ✓ . 
  - scss           ✓ . . ✓ . 
  - comment        ✓ . . . . 
  - jsdoc          ✓ . . . . 
  - elixir         ✓ ✓ ✓ ✓ ✓ 
  - sparql         ✓ ✓ ✓ ✓ ✓ 
  - gdscript       x x . . x 
  - heex           ✓ . ✓ ✓ ✓ 
  - ocaml          x x x . x 
  - godotResource  ✓ ✓ ✓ . . 
  - ocaml_interfacex x x . x 
  - turtle         ✓ ✓ ✓ ✓ ✓ 
  - query          ✓ ✓ ✓ ✓ ✓ 
  - ocamllex       x . . . x 
  - c              ✓ ✓ ✓ ✓ ✓ 
  - c_sharp        ✓ ✓ ✓ . ✓ 
  - typescript     ✓ ✓ ✓ ✓ ✓ 
  - beancount      ✓ . ✓ . . 
  - tsx            ✓ ✓ ✓ ✓ ✓ 
  - latex          ✓ . ✓ . ✓ 
  - scala          ✓ . ✓ . ✓ 
  - supercollider  ✓ ✓ ✓ ✓ ✓ 
  - llvm           ✓ . . . . 
  - hcl            x . x x x 
  - zig            ✓ . ✓ ✓ ✓ 
  - cmake          ✓ . ✓ . . 
  - tlaplus        x . x . x 
  - pioasm         ✓ . . . ✓ 
  - vim            ✓ ✓ . . ✓ 
  - json5          ✓ . . . ✓ 
  - toml           ✓ ✓ ✓ ✓ ✓ 
  - clojure        ✓ ✓ ✓ . ✓ 
  - glimmer        ✓ . . . . 
  - hjson          ✓ ✓ ✓ ✓ ✓ 
  - commonlisp     ✓ ✓ ✓ . . 
  - bibtex         ✓ . ✓ ✓ . 
  - go             ✓ ✓ ✓ ✓ ✓ 
  - r              ✓ ✓ . . . 
  - cpp            x x x x x 
  - svelte         ✓ . ✓ ✓ ✓ 
  - devicetree     ✓ ✓ ✓ ✓ ✓ 
  - cuda           x x x x x 
  - regex          ✓ . . . . 
  - jsonc          ✓ ✓ ✓ ✓ ✓ 
  - yaml           x x x x x 
  - dockerfile     ✓ . . . ✓ 
  - yang           ✓ . ✓ . . 
  - css            ✓ . ✓ ✓ ✓ 
  - lua            x x x x x 
  - nix            ✓ ✓ ✓ . ✓ 
  - surface        ✓ . ✓ ✓ ✓ 
  - glsl           ✓ ✓ ✓ ✓ ✓ 
  - erlang         . . . . . 
  - dot            ✓ . . . ✓ 
  - vue            x . x . x 
  - kotlin         ✓ . . . ✓ 
  - dart           ✓ ✓ . ✓ ✓ 
  - ledger         ✓ . ✓ ✓ ✓ 

  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: python(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\python.so is not a valid Win32 application.

  - ERROR: python(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\python.so is not a valid Win32 application.

  - ERROR: python(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\python.so is not a valid Win32 application.

  - ERROR: python(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\python.so is not a valid Win32 application.

  - ERROR: python(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\python.so is not a valid Win32 application.

  - ERROR: ruby(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ruby.so is not a valid Win32 application.

  - ERROR: ruby(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ruby.so is not a valid Win32 application.

  - ERROR: ruby(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ruby.so is not a valid Win32 application.

  - ERROR: ruby(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ruby.so is not a valid Win32 application.

  - ERROR: ruby(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ruby.so is not a valid Win32 application.

  - ERROR: perl(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\perl.so is not a valid Win32 application.

  - ERROR: bash(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\bash.so is not a valid Win32 application.

  - ERROR: bash(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\bash.so is not a valid Win32 application.

  - ERROR: bash(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\bash.so is not a valid Win32 application.

  - ERROR: bash(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\bash.so is not a valid Win32 application.

  - ERROR: php(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\php.so is not a valid Win32 application.

  - ERROR: php(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\php.so is not a valid Win32 application.

  - ERROR: php(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\php.so is not a valid Win32 application.

  - ERROR: php(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\php.so is not a valid Win32 application.

  - ERROR: php(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\php.so is not a valid Win32 application.

  - ERROR: html(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\html.so is not a valid Win32 application.

  - ERROR: html(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\html.so is not a valid Win32 application.

  - ERROR: html(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\html.so is not a valid Win32 application.

  - ERROR: html(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\html.so is not a valid Win32 application.

  - ERROR: html(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\html.so is not a valid Win32 application.

  - ERROR: gdscript(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\gdscript.so is not a valid Win32 application.

  - ERROR: gdscript(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\gdscript.so is not a valid Win32 application.

  - ERROR: gdscript(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\gdscript.so is not a valid Win32 application.

  - ERROR: ocaml(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml.so is not a valid Win32 application.

  - ERROR: ocaml(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml.so is not a valid Win32 application.

  - ERROR: ocaml(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml.so is not a valid Win32 application.

  - ERROR: ocaml(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml.so is not a valid Win32 application.

  - ERROR: ocaml_interface(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml_interface.so is not a valid Win32 application.

  - ERROR: ocaml_interface(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml_interface.so is not a valid Win32 application.

  - ERROR: ocaml_interface(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml_interface.so is not a valid Win32 application.

  - ERROR: ocaml_interface(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocaml_interface.so is not a valid Win32 application.

  - ERROR: ocamllex(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocamllex.so is not a valid Win32 application.

  - ERROR: ocamllex(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\ocamllex.so is not a valid Win32 application.

  - ERROR: hcl(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\hcl.so is not a valid Win32 application.

  - ERROR: hcl(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\hcl.so is not a valid Win32 application.

  - ERROR: hcl(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\hcl.so is not a valid Win32 application.

  - ERROR: hcl(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\hcl.so is not a valid Win32 application.

  - ERROR: tlaplus(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\tlaplus.so is not a valid Win32 application.

  - ERROR: tlaplus(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\tlaplus.so is not a valid Win32 application.

  - ERROR: tlaplus(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\tlaplus.so is not a valid Win32 application.

  - ERROR: cpp(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application.

  - ERROR: cpp(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application.

  - ERROR: cpp(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application.

  - ERROR: cpp(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application.

  - ERROR: cpp(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cpp.so is not a valid Win32 application.

  - ERROR: cuda(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cuda.so is not a valid Win32 application.

  - ERROR: cuda(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cuda.so is not a valid Win32 application.

  - ERROR: cuda(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cuda.so is not a valid Win32 application.

  - ERROR: cuda(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cuda.so is not a valid Win32 application.

  - ERROR: cuda(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\cuda.so is not a valid Win32 application.

  - ERROR: yaml(highlights): Failed to load parser: uv_dlopen: The specified module could not be found.

  - ERROR: yaml(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\yaml.so is not a valid Win32 application.

  - ERROR: yaml(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\yaml.so is not a valid Win32 application.

  - ERROR: yaml(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\yaml.so is not a valid Win32 application.

  - ERROR: yaml(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\yaml.so is not a valid Win32 application.

  - ERROR: lua(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\lua.so is not a valid Win32 application.

  - ERROR: lua(locals): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\lua.so is not a valid Win32 application.

  - ERROR: lua(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\lua.so is not a valid Win32 application.

  - ERROR: lua(indents): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\lua.so is not a valid Win32 application.

  - ERROR: lua(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\lua.so is not a valid Win32 application.

  - ERROR: vue(highlights): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\vue.so is not a valid Win32 application.

  - ERROR: vue(folds): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\vue.so is not a valid Win32 application.

  - ERROR: vue(injections): Failed to load parser: uv_dlopen: C:\Users\Swagat\AppData\Local\nvim\plugged\nvim-treesitter\parser\vue.so is not a valid Win32 application.

Output of nvim --version

NVIM v0.6.0-dev+560-g1fdbd29df
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compiled by runneradmin@fv-az152-482

Features: -acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info

Additional context

As you can see I use Windows 10 (x64), here is my configuration for tree-sitter :

"nvim-treesitter settings
lua <<EOF
require'nvim-treesitter.configs'.setup
{
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages

ignore_install = { "javascript" }, -- List of parsers to ignore installing

highlight = 
	{
		enable = true,         -- false will disable the whole extension
		--disable = { "rust" },  -- list of language that will be disabled
	}

}
require('nvim-treesitter.install').compilers = { "cl", "clang", "gcc" }
EOF

@17Swagat 17Swagat added the bug Something isn't working label Nov 6, 2021
@17Swagat
Copy link
Author

17Swagat commented Nov 6, 2021

IDK what was actually the problem but the followed the instructions in the Troubleshooting section of the following link (https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support) and now everything is working fine.

@maxxnino
Copy link
Contributor

maxxnino commented Nov 7, 2021

IDK what was actually the problem but the followed the instructions in the Troubleshooting section of the following link (https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support) and now everything is working fine.

yeah, sometime I have that error too, when this error happen again, just update nvim-treesitter, neovim-nightly and reinstall parser

@17Swagat 17Swagat closed this as completed Nov 7, 2021
@geofflangenderfer
Copy link

same issue on m1 mac

@maxxnino how do you reinstall parser?

@maxxnino
Copy link
Contributor

@geofflangenderfer in neovim type :TSInstall lua replace language you want to install

@Luvjeet
Copy link

Luvjeet commented Apr 14, 2022

I am still facing this problem I have installed clang version 14.0.0 add to path but still I get error cannot run html.so file in win32
nvim version 0.6.1

@wunoman
Copy link

wunoman commented May 6, 2022

I use :TSInstall vue online and everything is fine, then copy entire directory to the machine offline, get error vue.so is not a valid win32 file. I still find the approach to use it in offline.

@nz45s2
Copy link

nz45s2 commented May 6, 2022

I'm having the extract same issue here and :TSUpdate shows All parsers are up-to-date. :TSInstall all shows everything installed properly.
Appreciated for any advice in advance!

@wunoman
Copy link

wunoman commented May 7, 2022

I found it. From :checkhealth I see compiler select gcc in online circumstance and clang in offline, and ABI different one is 13 and another 14.
Solution: make them same, all use clang by put below in config lua
require 'nvim-treesitter.install'.compilers = { 'clang' }

and then reinstall and recompile in online, copy parser to offline, everything is find.

@ar492
Copy link

ar492 commented May 19, 2022

You need a 64 bit parser because neovim is 64 bit but you likely have 32 bit MinGW. So downloading 64 bit MinGW should fix (it did for me).

@William9923
Copy link

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop

Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

@ansumanbebarta
Copy link

ansumanbebarta commented Sep 27, 2022

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop

Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

Worked perfectly for me on Windows!!! Thank you
The only change I did was:
require 'nvim-treesitter.install'.compilers = { 'zig' }

@nomyfan
Copy link

nomyfan commented Dec 1, 2022

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop
Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

Worked perfectly for me on Windows!!! Thank you The only change I did was: require 'nvim-treesitter.install'.compilers = { 'zig' }

Saved my life.

@techCarpenter
Copy link

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop

Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

This installation can also be done by using chocolatey: choco install zig

@BillyFromTheFutur
Copy link

  1. scoop install zig

THANKS !!!!!!!!!!!!!!!!!

@0-th
Copy link

0-th commented Feb 15, 2023

Ran into similar issue on a Linux machine when I ran the :checkhealth command.
I just looked up the parser that was causing the issue from the :checkhealth output and I ran :TSInstall {parser_name}. In my case the parsers were wgsl and wgsl_bevy.
Hope this helps.

@giuseppe-g-gelardi
Copy link

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop

Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

this doesnt work at all. when i try to add the compiler i get this

Error detected while processing C:\Users\me\AppData\Local\nvim\init.lua:
E5112: Error while creating lua chunk: C:\Users\me\AppData\Local\nvim\init.lua:249: '}' expected (to close '{' at line 68) near '.'

@samir1498
Copy link

2. require 'nvim-treesitter.install'.compilers = { 'clang' }

try it like this require ('nvim-treesitter.install').compilers = { 'clang' }

@D3N2-A
Copy link

D3N2-A commented Mar 29, 2023

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop

Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

Thank you so much. It took me so much time and finally this helped

@D3N2-A
Copy link

D3N2-A commented Mar 29, 2023

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop
Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

this doesnt work at all. when i try to add the compiler i get this

Error detected while processing C:\Users\me\AppData\Local\nvim\init.lua: E5112: Error while creating lua chunk: C:\Users\me\AppData\Local\nvim\init.lua:249: '}' expected (to close '{' at line 68) near '.'

You have done syntax mistake in config file check again

@max-programming
Copy link

Just want to add suggestion for other who had same issue. Installing zig as compiler would be a faster solution (for Windows user). This method assume you had installed scoop
Steps:

  1. scoop install zig : install zig
  2. Modify compiler used : require 'nvim-treesitter.install'.compilers = { 'clang' }
  3. Re-install each lang.

For me, this solution works and its quite easy. Have a good day 🙏

Worked perfectly for me on Windows!!! Thank you The only change I did was: require 'nvim-treesitter.install'.compilers = { 'zig' }

Thank you very much! I tried all other compilers but zig worked flawlessly!

@nvim-treesitter nvim-treesitter locked and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests