Open liar666 opened 3 years ago
SOLUTION: Using: $ export _JAVA_OPTIONS=-Djava.net.useSystemProxies=true $ /home/user/.emacs.d/.cache/lsp/metals/metals worked
lsp-metals should add -Djava.net.useSystemProxies=true
to any call to metals
, or configure JVM's proxy from Emacs proxy configuration
WORK-AROUND:
For those with the same problem, running _JAVA_OPTIONS="$_JAVA_OPTIONS -Djava.net.useSystemProxies=true" emacs tmp/lsp/test.scala
works
Afaict there's no combination of env vars that work to get flags to bootstrap at https://github.com/emacs-lsp/lsp-metals/blob/master/lsp-metals.el#L400, I guess perhaps there should be a lsp-metals-coursier-args to allow adding flags to the bootstrap step, in my case -J-Djavax.next.ssl.trustStore
Describe the bug A clear and concise description of what the bug is.
I'm behind a proxy, opening a .scala file leads to lsp + metals trying to install/update, which results in error (buffer
*metals::stderr*
):Seems that the proxy configuration is not taken into account (I've tried with env vars
*_proxy
and in emacs config)To Reproduce Steps to reproduce the behavior(sample project + file which can be used to reproduce the issue with.)
Expected behavior A clear and concise description of what you expected to happen.
All Emacs connexions (included lsp/lsp-* upgrades) should pass through proxy when it is configured
Screenshots If applicable, add screenshots to help explain your problem.
Logs Please include the debug stack trace (if there is an error) and the content of Messages buffer with
lsp-print-io
set to t in case the bug is related to client->server communication. cf aboveEDIT: I've also tried
C-u M-x lsp-install-server
metals
, which seems to have worked (*messages*
buffer)But without success
EDIT2: I'm discovered metals is installed in
/home/user/.emacs.d/.cache/lsp/metals/metals
... I've tried to run/update it manually by running the command in a terminal... Seems to ignore the proxy too....