Open joyofirony opened 1 year ago
Can't we just add an option to specify the executable via the setup
function?
I'm also having problems getting mason to detect my pyenv-win
path under MSYS2.
neovim/neovim#21175 doesn't help either, because it only works if your shell is pwsh
or cmd
.
I'm currently using this hack, which works for for python:
vim.g.python3_host_prog = "python.bat"
I also would like the ability to specify the executable paths if possible. I use lazy loading for loading npm
/nvm
/node
and even though I can run npm
at the command line, Mason isn't able to detect that it's there.
I have a similar issue when attempting to install the typescript lsp, though in my case it seems to fail to resolve node
Failed (1)
◍ typescript-language-server
▼ Displaying full log
Volta error: Node is not available.
To run any Node command, first set a default version using `volta install node`
Error details written to /Users/jonasbadalic/code/sentry/.devenv/bin/volta-home/log/volta-error-2024-05-31_17_05_06.
spawn: npm failed with exit code 126 and signal 0.
Checkhealth for mason.nvim shows this error.
OK node: `v20.13.1`
I've searched open issues for similar requests
Yes
I've recently downloaded the latest plugin version of mason.nvim
Problem description
After installing the mason.nvim plugin, no LSP server relying on NPM could not be installed even though both Node and Npm executables can be found in %PATH%:
I used scoop to install volta, and then installed node/npm through volta.
After checking Issue #781, it seems that mason only checks the npm executable through npm.cmd or npm and does not consider npm.exe as a valid candidate (volta installed only .exe files, no .cmd nor .ps1).
I updated the spawn.lua file as below:
and managed to get npm.exe recognized by mason:
Expected behavior
Npm-based LSP servers shoud install successfully
Affected packages
Any that uses npm
Mason output
Installation log
Neovim version (>= 0.7)
NVIM v0.8.2 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilé par runneradmin@fv-az28-353
Operating system/version
Windows 11
Healthcheck
Screenshots
No response