vlang / v-analyzer

The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more.
MIT License
99 stars 11 forks source link

the vscode extension should be more lax in finding the v-analyzer executable #10

Open spytheman opened 8 months ago

spytheman commented 8 months ago

Describe the bug

The readme suggests using this:

{
  "v-analyzer.serverPath": "/path/to/v-analyzer/bin/v-analyzer"
}

and that is fine on POSIX systems, since the executable files there, do not depend on a specific extension to run.

On Windows though, using that full path, also needs the .exe extension, and that is not mentioned in the README at all, and is not very intuitive to deduce.

Expected Behavior

The vscode extension, should be more flexible, and allow for both /path/v-analyzer and /path/v-analyzer.exe, and also v-analyzer and v-analyzer.exe, if they are in PATH.

Current Behavior

Using the full path, but without .exe on windows systems fails with v-analyzer is not installed, which is too sparse, and can not be used to diagnose the actual problem.

Reproduction Steps

Put just an absolute path to the v-analyzer executable in your settings file, for "v-analyzer.serverPath", but without .exe in it.

Possible Solution

No response

Additional Information/Context

No response

Environment details (v doctor output)

Native windows, the rest does not matter, since the problem affects the extension.

Editor name

vscodium

v-analyzer Version

v-analyzer version 0.0.4-beta.1.1814be2

VS Code Extension Version

vscode-v-analyzer-0.0.4.vsix

spytheman commented 8 months ago

A good addition will be also this:

katekyy — Днес в 14:13 and then change the path in the config so it doesn't need to search all the variants all over again