williamboman / nvim-lsp-installer

Further development has moved to https://github.com/williamboman/mason.nvim!
https://github.com/williamboman/mason.nvim
Apache License 2.0
2k stars 123 forks source link

Windows: Installation failed, rust_analyzer, unable to unpack gz file #827

Open DariusCorvus opened 2 years ago

DariusCorvus commented 2 years ago

https://github.com/williamboman/nvim-lsp-installer/blob/5a0bf929eefad999e92963ee227c23a804cf0788/lua/nvim-lsp-installer/core/managers/std/init.lua#L159

Issue

During the installation of the rust_analyzer on the windows platform occurs an error caused by unpacking the corresponding gz file.

Solution

Replacing the function for win platform with the code from the unix platform function. This is possible because gunzip is an inbuilt tool in window >= 10

williamboman commented 2 years ago

Hello! Hmm I've been unable to verify that gzip comes with stock Windows. I know tar was added, which is used in this plugin, but I remember being unable to find a suitable stock alternative for gunzip. Do you perhaps have cygwin or mingw installed?

williamboman commented 2 years ago

I'd be open to actually attempting these "POSIX" commands before falling back to Windows-specific tooling, should they be available (e.g. via cygwin et al). I'll look into extending your PR with this