ZigBrains icon indicating copy to clipboard operation
ZigBrains copied to clipboard

Support WSL binaries for zig/zls

Open Zelinzky opened this issue 1 year ago • 5 comments

The plugin works relatively well, but when working with wsl projects it continues to use windows zig binaries. It would be ideal that the plugin detects when running a wsl project and uses zig and zls from the wsl path.

Zelinzky avatar Jul 23 '24 00:07 Zelinzky

You can change the zig and zls paths to point to the "wsl" binaries in the per-project settings under Settings -> Languages & Frameworks -> Zig; Zig Settings -> Toolchain location and ZLS launch settings -> Executable path

FalsePattern avatar Jul 23 '24 10:07 FalsePattern

yes, i attempted to do this. I point to zls binary no problem, but whenever i select my instalation path for zig itself it is ignored. Screenshot 2024-07-23 115730

After i hit apply and reopen the config it is gone. and it never shows the toolchain version like it does with the windows binaries.

image

Zelinzky avatar Jul 23 '24 17:07 Zelinzky

ZigBrains can only run native executables for zig and zls at the moment, support for cross-platform and remote binaries is planned in the future, but for now you'll need to use a windows exe for them (or alternatively, install a linux version of your IDE into the WSL environment, and then use intellij Code With Me to remotely connect to it).

FalsePattern avatar Jul 23 '24 19:07 FalsePattern

Gotcha!

Zelinzky avatar Jul 23 '24 23:07 Zelinzky

@Zelinzky how are you running things i have been using it with WSL just fine, since its running on the remote side using the gateway stuff in clion. works almost as well as when i am booted into a proper linux distro.

cmcpasserby avatar Feb 10 '25 12:02 cmcpasserby