Reputation: 3
I'm trying to use the treesitter plugin of neovim on windows, but it doesn't work,
error as follows:
c.so is not a valid Win32 application
python.so is not a valid Win32 application
I did some research which says perhaps there are something wrong with the compiler, but i don't known how to fix the problem, anyone help me?
Upvotes: 0
Views: 7380
Reputation: 2176
Probably something messed up during compilation of grammar files, to try to fix this issue, do following steps:
Ensure that you have appropriate compiler installed and treesitter is configured to work with it:
clang --version
it should output something like this:
clang version 13.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
if vim.loop.os_uname().sysname == "Windows_NT" then
require('nvim-treesitter.install').compilers = { "clang" }
end
Note: I use here if, because I use same configuration files both on windows and on linux environments.Reinstall treesitter plugin (do it according to your plugin manager)
%USERPROFILE%\AppData\Local\nvim-data\site\pack\packer\start\nvim-treesitter
Reinstall required parsers with :TSInstall
command, that is probably it.
Upvotes: 1