@@ -836,19 +836,31 @@ PROJECT-URI uri of the item."
836
836
(goto-char (point-min )))
837
837
(user-error " Failed to calculate project for buffer %s" (buffer-name ))))))
838
838
839
+ (cl-defmethod lsp-execute-command
840
+ ((_server (eql jdtls)) (command (eql java.show.references)) params)
841
+ (if-let (refs (third params))
842
+ (xref--show-xrefs (lsp--locations-to-xref-items refs) nil )
843
+ (user-error " No references" )))
844
+
845
+ (cl-defmethod lsp-execute-command
846
+ ((_server (eql jdtls)) (command (eql java.show.implementations)) params)
847
+ (if-let (refs (third params))
848
+ (xref--show-xrefs (lsp--locations-to-xref-items refs) nil )
849
+ (user-error " No implementations" )))
850
+
839
851
(lsp-register-client
840
852
(make-lsp--client
841
853
:new-connection (lsp-stdio-connection 'lsp-java--ls-command )
842
854
:major-modes '(java-mode )
843
855
:server-id 'jdtls
844
856
:multi-root t
845
- :notification-handlers (lsp-ht (" language/status" 'lsp-java--language-status-callback )
846
- (" language/actionableNotification" 'lsp-java--actionable-notification-callback )
847
- (" language/progressReport" 'lsp-java--progress-report )
848
- (" workspace/notify" 'lsp-java--workspace-notify ))
857
+ :notification-handlers (lsp-ht (" language/status" # 'lsp-java--language-status-callback )
858
+ (" language/actionableNotification" # 'lsp-java--actionable-notification-callback )
859
+ (" language/progressReport" # 'lsp-java--progress-report )
860
+ (" workspace/notify" # 'lsp-java--workspace-notify ))
849
861
850
862
:request-handlers (lsp-ht (" workspace/executeClientCommand" 'lsp-java--boot-workspace-execute-client-command ))
851
- :action-handlers (lsp-ht (" java.apply.workspaceEdit" 'lsp-java--apply-workspace-edit ))
863
+ :action-handlers (lsp-ht (" java.apply.workspaceEdit" # 'lsp-java--apply-workspace-edit ))
852
864
:uri-handlers (lsp-ht (" jdt" 'lsp-java--resolve-uri )
853
865
(" chelib" 'lsp-java--resolve-uri ))
854
866
:initialization-options (lambda ()
@@ -868,7 +880,7 @@ PROJECT-URI uri of the item."
868
880
(lsp-java-update-project-uris)))))
869
881
870
882
(defun lsp-java-spring-initializr ()
871
- " Emacs frontend for https://start.spring.io/ ."
883
+ " Emacs frontend for https://start.spring.io/."
872
884
(interactive )
873
885
(let ((base-url " https://start.spring.io/" ))
874
886
(message " Requesting spring initializr data... " )
0 commit comments