Does it works with Java 17 ?
Tried but ended up with hangs while doing completion.
thatās probably not a relevant factor in whatever youāre experiencing, Iāve for sure used it in a Java 17 project. Itāll almost certainly break on Java 8 because I forget to test on it these days.
Any suggestion ?
Itās impossible to say anything without seeing your project. Is it public? Does Metals / IntelliJ work on that completion? Any error messages?
To debug further Iād suggest sticking some println
into the ensime code and rebuild the .jar
file. Try to reproduce it in the tests
folder so that it can be automated.
Figure it out that the graalvm
does not working with the ZGC
, so the server never started.
oh interesting. So thatās here in launcher.scala
val javaFlags = if (javaVersion >= 13) {
List("-XX:+UseZGC")
} else if (javaVersion >= 9) {
List("-XX:+ShrinkHeapInSteps")
} else Nil
The reason for this code is because ZGC will reduce the physical memory in line with the heap usage and I wanted to keep the overhead of the ensime server as small as possible.
Do you have a suggestion of how to detect graalvm and/or a more appropriate flag? As a potential workaround I could only enable ZGC on openjdk. Richard Stallman would like that: make it better for users of Free Software and a worse experience for those using proprietary systems
java -version
shall contain string GraalVM
. But no such system properties indicates it is GraalVM
.
Maybe just add something to README
is enough.
Suggestion: register to standard completion-at-point-functions
instead of company-backends
, then, it could get ride of the company
dependency.
The reason for this code is because ZGC will reduce the physical memory in line with the heap usage
AFAIK G1 does that now too, so one doesnāt need to change the default GC (G1) to achieve this end
Good luck with ENSIME!
now being the important part. I still have Java 13 and 15 projects. I should probably have a 17+ check that does nothing.
I use company-mode
so Iām not sure what advantage that would give me. Would I lose or gain any functionality?
Any version between 11 and 17 is officially dead by now, so I was guessing you might want to easy the burden of supporting those versionsā¦
But life is complicated, you know what you need best
People keep telling me āthis thingā or āthat thingā is dead, and yet Iām happily using it just fine. I think some people attach a different meaning to these words than I do. I hope Iām not just walking around with expired parrots in my pocket.
Not very much to gain indeed, but most modes like āemacs-lisp-modeā or css-mode
define completion function to the builtin completion-at-point-function
. The only advantage I can see is user can use other completion ui like https://github.com/minad/corfu . And company actually support completion-at-point-functions
via company-capf
Hi @fommil I want to use ensime in spacevim, and create a vim plugin for it. How to visite this repo, thanks.
Hi @wsdjeg thatād be really interesting. You donāt need access to the repo to do that, just download the source code from ensime.github.io and take it from there! Happy hacking.
https://ensime.github.io/ v3.0.2 āThe Naked Nowā has intial LSP support for vscode, thanks for all the help folk.
Would you be interested in a vscode extension to consume the new LSP support?
edit: nevermind, I see thereās one in the new repo Giving it a go now.
v3.0.5 now available with a feature complete beta vscode extension (now available as an easy download) at https://ensime.github.io/
@smarter ENSIME isnāt providing diagnostic information, but if it ever does Iād rather get it from the batch compiler (not the interactive compiler) in both Scala 2 and Scala 3.
The only way I can do this is by registering, from a compiler plugin, to the Reporter. Is that possible in Scala 3? In Scala 2 it is theoretically possible to just mutate the Reporter in Global, which wonāt work if something has cached the reference, but should work in theory.
Having a way to have plugins register on startup to messages sent to the Reporter seems like it might be a good feature in general.