lsp-java icon indicating copy to clipboard operation
lsp-java copied to clipboard

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

Open RobinBeekhof opened this issue 4 years ago • 10 comments

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:

RobinBeekhof avatar Nov 17 '20 14:11 RobinBeekhof

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

yyoncho avatar Nov 17 '20 15:11 yyoncho

Do you have a suggestion how I could fix this?

RobinBeekhof avatar Nov 17 '20 18:11 RobinBeekhof

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

yyoncho avatar Nov 18 '20 16:11 yyoncho

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

RobinBeekhof avatar Nov 21 '20 19:11 RobinBeekhof

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

yyoncho avatar Nov 21 '20 20:11 yyoncho

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

RobinBeekhof avatar Nov 21 '20 21:11 RobinBeekhof

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

yyoncho avatar Nov 22 '20 09:11 yyoncho

I am experiencing the same issue

ghost avatar Jan 22 '21 22:01 ghost

I would also love a resolution to this issue.

CaderHancock avatar Feb 24 '21 23:02 CaderHancock

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

yyoncho avatar Feb 25 '21 07:02 yyoncho