emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
646 stars 90 forks source link

lsp-java-boot doesn't show lsp-ui correctly, with error: wrong-type-argument plistp #294

Open RobinBeekhof opened 3 years ago

RobinBeekhof commented 3 years ago

Describe the bug I added lsp-java in a new install of spacemacs (dev branch). lsp-java itself works fine and shows lsp-ui. However when I add lsp-java-boot lsp-ui doesn't work anymore and I get the error "Error processing message (wrong-type-argument plistp..."

Expected behavior I expect lsp-ui to be shown correctly, for example: image

Screenshots I added java-lsp to dotspacemacs-configuration-layers image

I added the config for lsp-java-boot to the user-config image

Logs Spacemacs is ready. Skipping check for new version (reason: dotfile) Package cl is deprecated [yas] Prepared just-in-time loading of snippets successfully. using config for config_mac LSP :: Waiting for connection for boot-ls, retries: 0 LSP :: Waiting for connection for boot-ls, retries: 1 LSP :: Waiting for connection for boot-ls, retries: 2 LSP :: Waiting for connection for boot-ls, retries: 3 LSP :: jdtls:26321 initialized successfully Error running timer: (error "The connected server(s) does not support method textDocument/documentHighlight. To find out what capabilities support your server use ‘M-x lsp-describe-session’ and expand the capabilities section") LSP :: Waiting for connection for boot-ls, retries: 4 LSP :: Waiting for connection for boot-ls, retries: 5 LSP :: Waiting for connection for boot-ls, retries: 6 LSP :: Waiting for connection for boot-ls, retries: 7 LSP :: Waiting for connection for boot-ls, retries: 8 LSP :: Waiting for connection for boot-ls, retries: 9 LSP :: Waiting for connection for boot-ls, retries: 10 LSP :: Waiting for connection for boot-ls, retries: 11 LSP :: Waiting for connection for boot-ls, retries: 12 LSP :: Waiting for connection for boot-ls, retries: 13 LSP :: Waiting for connection for boot-ls, retries: 14 LSP :: Waiting for connection for boot-ls, retries: 15 LSP :: Successfully connected to boot-ls LSP :: Connected to [jdtls:26321][boot-ls:26323 status:starting]. LSP :: boot-ls:26323 initialized successfully End of buffer [6 times] Search failed: there is an unmatched expression somewhere or we are at the beginning/end of file. [4 times] Error processing message (wrong-type-argument plistp (#s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("language" "java" "value" "java.lang.Override")) "Indicates that a method declaration is intended to override a method declaration in a supertype. If a method is annotated with this annotation type compilers are required to generate an error message unless at least one of the following conditions hold:

yyoncho commented 3 years ago

most likely lsp-mode bug related to merging the information from both servers.

RobinBeekhof commented 3 years ago

Do you have a suggestion how I could fix this?

yyoncho commented 3 years ago

proposed fix at https://github.com/yyoncho/lsp-mode/tree/hover-java

RobinBeekhof commented 3 years ago

Yes great! this resolved the errors. I do notice now however that lsp-ui does not show the pop-up when both lsp-java and lsp-java-boot are active in the same file. Do I need to do some config to enable this? I'm still quite new to emacs/spacemacs

yyoncho commented 3 years ago

I have to investigate the lsp-ui issue. Setting lsp-ui-doc-include-signature to t might fix the issue.

RobinBeekhof commented 3 years ago

I added (setq lsp-ui-doc-include-signature t) to my user-config, but that did not make any difference

yyoncho commented 3 years ago

Then it seems like it is lsp-mode/lsp-ui bug.

ghost commented 3 years ago

I am experiencing the same issue

CaderHancock commented 3 years ago

I would also love a resolution to this issue.

yyoncho commented 3 years ago

I will merge https://github.com/yyoncho/lsp-mode/commit/06c5677a067666ba140451606040405fa972ce64 later today.