Open muradm opened 2 years ago
I have the same problem on nixos. But if you have coursier installed on your system it should work fine: https://github.com/emacs-lsp/lsp-metals/blob/6980fb902c3c7b43ff0d4056a6cd7d8b4709866e/lsp-metals.el#L252-L253 Looks like coursier suggests to use native launchers by default: https://get-coursier.io/docs/cli-installation#native-launcher but I'm not sure whether it makes sence in our case - we will need jvm anyway to launch metals.
Describe the bug Currently
metals
gets bootstraped withcoursier
binary. However precompiled binaries provided bycoursier
are not running underGuix
due to the nature of distribution and how it deals with linux ld loader.When
(lsp-install-server t 'metals)
is executed on such environemnt,*Messages*
will have:Below sequence of commands illustrating the issue with downloaded non-working launcher and working
ls
command as example.To Reproduce Setup
Guix
,emacs
for your liking and try(lsp-install-server t 'metals)
.Expected behavior Should be possible to use
lsp-metals
out-of-the-box.In order to solve this issue, it could be better to use
jar
version ofcoursier
launcher. It requires onlyjava
to be present in the system, which should be available any way. It will also simplify things for multiple platforms, as it should be running on any platform havingjava
preinstalled.Workaround Dig
lsp-metals
to identify howcoursier
is used. Findemacs
lsp
server install path. Do thelsp-install-server
work manually. For instance: