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

Couldn't find Zig Language Server (ZLS) executable at "/home/janne/.vscode-server/data/User/globalStorage/ziglang.vscode-zig/zls_install/zls" #1137

Closed
nurpax opened this issue Apr 17, 2023 · 6 comments
Labels
bug Something isn't working editor:vscode

Comments

@nurpax
Copy link

nurpax commented Apr 17, 2023

Zig Version

0.11.0-dev.1893+277015960

Zig Language Server Version

0.3.2

Steps to Reproduce

Start zig project with VScode by running code . in my zig project root.

This used to work for several weeks, I suddenly started getting this today:

image

Directory /home/janne/.vscode-server doesn't exist. I wonder if zls is looking into the wrong directory somehow?

I did use ZLS yesteray with Windows WSL, maybe VSCode WSL extension installation changed something that broke ZLS?

Expected Behavior

I'd expect ZLS to start without problems in VSCode.

Actual Behavior

Zig language extension in VSCode errors with:

Couldn't find Zig Language Server (ZLS) executable at "/home/janne/.vscode-server/data/User/globalStorage/ziglang.vscode-zig/zls_install/zls"

@nurpax nurpax added the bug Something isn't working label Apr 17, 2023
@nurpax
Copy link
Author

nurpax commented Apr 17, 2023

Something had a added this line:

"zig.zls.path": "/home/janne/.vscode-server/data/User/globalStorage/ziglang.vscode-zig/zls_install/zls",

into my VSCode user settings json file. I deleted that line and restarted VSCode and it works now.

Maybe this got added when I started VSCode from within a WSL shell with code . that starts a VSCode remote session? I'm keeping this open in case it's useful information for the developers.

@sansseriff
Copy link

Yes it has something to do with remotes, maybe also wsl. I setup zls on a remote computer named artemis, and now that I'm doing local development again, it's still looking at the remote path.

artemis

@brdjns
Copy link

brdjns commented Jun 4, 2023

Has a fix been found for this? I got this problem on WSL as well but deleting the line and reinstalling the Zig language extension failed to fix it.

@sansseriff
Copy link

Until there's a real fix, I had to uninstall vscode, delete it's appdata folder, and reinstall.

For windows: https://stackoverflow.com/questions/47689536/how-to-completely-uninstall-vs-code-on-windows

Maybe you can get it working just by deleting some zls folder in %USER%\\.vscode\extensions. Not sure.

@laoshaw
Copy link

laoshaw commented Jun 20, 2023

can not find zls in vim9 running on ubuntu 22.04 either:

image

zig.zls.path is correctly configured after installing coc-zls:
image

@Techatrix
Copy link
Member

this is an issue with the vscode-zig extension which is being tracked here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working editor:vscode
Projects
None yet
Development

No branches or pull requests

5 participants