Closed yuan-kuan closed 10 months ago
Using the same versions, I can't reproduce on a Java project that contains only one file test.java
:
class test {
public static void main(String[] args) {
foo();
}
static void foo() {}
}
I get completions in insert mode and everything still works fine after insert mode.
- no new event was observed in the kak-lsp log (the enter insert mode did not fire anything?)
On i
, the only thing that should be sent is signatureHelp
. But every subsequent key should (after 50ms) send a didChange
notification to the server.
If that doesn't happen there is something seriously wrong that should show up in the kak-lsp log, so if none of the below helps please include the log.
- The only command that work? Quit the Java LSP. That works. Java LSP will respond to that.
Quit as in pkill -f jdtls
? Could also run lsp-disable
, wait a few milliseconds, then run lsp-enable
to restart it.
Couple things to try:
jdtls
wrapper script by default, so pull first.HOME=$(mktemp -d) kak -e '
eval %sh{kak-lsp --kakoune -s $kak_session}
set global lsp_cmd "kak-lsp -s %val{session} -vvvv --log /tmp/kak-lsp.log"
lsp-enable'
Can you send me a project where I can repro?
After the bug happens, is there anything in the *debug*
buffer.
Figure out how to access the jdtls log file. If it logs to stderr that should show up in kak-lsp's log but most servers use a file.
The only things that don't work for me are code actions/code lenses because this server doesn't implement the workspace/executeCommand
interface..
My problem is solved. @krobelus, thank you for the quick assist and your detailed reply. I am sure you are wondering what could have solved my case, I was surprised too. All I did is to include lsp-enable
into my kakrc
, after learning the way you started Kakoune and kak-lsp:
# LSP enabling
eval %sh{kak-lsp --kakoune -s $kak_session}
# set global lsp_cmd "kak-lsp -s %val{session} -vvv --log /tmp/kak-lsp.log"
lsp-enable # <--- I just added this
I realized my Java LSP kept working after I tried to restart it with :lsp-enable
instead of doing my usual :lsp-capacities
via user mode. Which led me to add this lsp-enable
into my kakrc
.
How I survived without lsp-enable
with my Dart development is the story of another day. But with it now, I can have my Java LSP running without becoming unresponsive.
Hello!
Just yesterday, I am starting to learn Java for a new project, thus setting up my Kakoune for Java development. So, I never run any Java LSP before and I am installing everything latest:
I have managed to run the Java-lsp with both the
jdtls
script and the recommended way of doingjava
with a bunch of arguments. Both gave me the same issue. I will list out my observations. Note that I have been observing the kak-lsp log and the.log
file spawned byjdtls
in the data folder..java
file from a Java project.With the same session of Kakoune, my Dart LSP is working flawlessly. I can enter insert mode, come out and continue working with Dart files. One thing I observed from Dart LSP is, whenever I enter insert mode, kak-LSP will create a new event. I did not observe this with Java LSP.
I hope I have provided enough information here. Please tell me if anything else is needed. Or this is an issue with
jdtls
instead? I have tried the older version but still seeing the same issue.