Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@hashiiiii
Copy link

I used auto review by Github Copilot, so I remake it.
#439 (comment)

@Vexu
Copy link
Member

Vexu commented Jul 13, 2025

fix: remove 'install Zig/ZLS' options that delete user settings

Why?

This also doesn't fix #424 so I'm not sure if there is anything useful here.

@hashiiiii
Copy link
Author

hashiiiii commented Jul 14, 2025

@Vexu

I was mistaken.

I was troubled by an issue where the correct paths to the zig and zls executables that I had written in settings.json were being rewritten.
What I wrote as:

"zig.path": "/Users/hashiiiii/.local/share/mise/installs/zig/0.14.1/bin/zig",
"zig.zls.path": "/Users/hashiiiii/.local/share/mise/installs/zls/0.14.0/zls",

was being automatically changed to:

"zig.path": "/Users/hashiiiii/.local/share/mise/shims/zig",
"zig.zls.path": "/Users/hashiiiii/.local/share/mise/shims/zls",

It seems I mistakenly believed that this was being caused by the automatic resolution feature for zig and zls executables in vscode-zig. However, upon reading the code again, I found that it was written in such a way that it would not rewrite settings.json unless you press installZig or installZls in the error dialog. (By the way, mise in the path is a package manager. I am using it to install zig and zls.)

So, while investigating by adding logs, I found that what was causing this phenomenon was a feature of mise-vscode at the URL below:
https://hverlin.github.io/mise-vscode/reference/settings/#miseconfigureextensionsautomatically
Since zig is a language supported by mise, this feature automatically rewrote settings.json to change the paths to reference the mise executables.

lrwxr-xr-x@    - hashiiiii 12 Jul 21:19  /Users/hashiiiii/.local/share/mise/shims/zig -> /Users/hashiiiii/.local/bin/mise
lrwxr-xr-x@    - hashiiiii 12 Jul 21:19  /Users/hashiiiii/.local/share/mise/shims/zls -> /Users/hashiiiii/.local/bin/mise

In this state, vscode-zig would load settings.json, and naturally, an error occurred because the mise executables are not the zig and zls executables. Using installZig , installZls, or restarting VS Code in this state did not solve anything.

I've written a lot, but I now understand that this PR is an unnecessary change and that the behavior of vscode-zig is not strange at all.

I don't think many people use mise-vscode and vscode-zig in combination, but I will leave behind the information that everything will work well if you add this line to settings.json: mise.configureExtensionsAutomaticallyIgnoreList": ["ziglang.vscode-zig"] .

I am sorry for taking up your time.

@hashiiiii hashiiiii closed this Jul 14, 2025
@hashiiiii hashiiiii deleted the preserve-path-configs branch July 14, 2025 15:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants