-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
Can't install parser with shellslash option enabled on Windows #2844
Comments
Might be the same problem as #1965, not enough info there though. |
I'm also interested in this fix and can help reproduce it.
A quick search led to nvim-treesitter/lua/nvim-treesitter/utils.lua Line 116 in 2610505
Apparently, the slash is returned by Neovim. I see there already are a few substitutions for the correct path separator in the plugin. Maybe it's worth fixing the path separator right here? Or at least in
|
I have this issue with Any suggestions? Edit: I deleted the Ran EDIT: This solution might be working for when you are getting |
Please add the |
@vimode Are you sure the error you've is exactly the same? I believe you cannot remove or update parser for a language which is in use on Windows (like if you have an open buffer which uses it), I guess it has something to do with the fact that you cannot remove files which are in use on Windows, but I believe the error message is different, like "access denied". |
Interesting, I think that might be reason why I wasn't able to update it and after deleting it I was able to install it again. I had But with TSInstall I was not getting {
cmd = "cmd",
opts = {
args = { "/C", "if", "exist",. ..
stdio = {
[2] = <userdata 1>,
[3] = <userdata 2>
}
}
} Now that you mentioned I will try to find a screenshot if I have to be certain what it was, I am sure it wasn't access denied at the end of the error. Till I find a screenshot I will edit my comment above to update with this info. Thank you. |
Always use backlashes as path separators in commands when they are used in cmd.exe. Fixes nvim-treesitter#2844 nvim-treesitter#1965
Still not working on windows. |
Why is this close?!
Same was with lua so I deleted it from ensure_installed. |
Your error shows that the installation worked. You have an error loading the compiled extension that apparently succeeded compiling. This is unlikely related to shellslash but rather the compiler setup. The compiled |
@theHamsta ok, thx. So is there anything that I can do to fix it? [Edit] Thank you @theHamsta for advice. |
I solved by:
|
Describe the bug
This error is shown when attempting to install language parser with
shellslash
option enabled:To Reproduce
Example with
lua
::set shellslash
:TSInstall lua
y
to reinstall iflua
is already installed.cmd
(rmdir
, seeDescribe the bug
section for full message) will fail with message:Invalid switch - "nvim-data\tree-sitter-lua".^M
Expected behavior
Installation and update of language parsers should be possible no matter what is the setting of
shellslash
option.Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
lua
is just an example, it seems like no language parser can be installed withshellslash
option enabled.The text was updated successfully, but these errors were encountered: