Skip to content

Commit 1556ac6

Browse files
committed
File watches
1 parent 81e3ef0 commit 1556ac6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lsp-java.el

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ PARAMS the parameters for language status notifications."
426426
"Callback for java/applyWorkspaceEdit.
427427
428428
ACTION is the action to execute."
429-
(lsp--apply-workspace-edit (car (gethash "arguments" action))))
429+
(lsp--apply-workspace-edit (seq-first (gethash "arguments" action))))
430430

431431
(defun lsp-java--actionable-notification-callback (_workspace params)
432432
"Handler for actionable notifications.
@@ -898,7 +898,17 @@ PROJECT-URI uri of the item."
898898
(buffer-string))))))
899899
:initialized-fn (lambda (workspace)
900900
(with-lsp-workspace workspace
901-
(lsp-java-update-user-settings)))))
901+
(lsp-java-update-user-settings)
902+
(lsp--server-register-capability
903+
(ht ("id" "test-id")
904+
("method" "workspace/didChangeWatchedFiles")
905+
("registerOptions" (ht ("watchers"
906+
(vector (ht ("globPattern" "**/*.java"))
907+
(ht ("globPattern" "**/pom.xml"))
908+
(ht ("globPattern" "**/*.gradle"))
909+
(ht ("globPattern" "**/.project"))
910+
(ht ("globPattern" "**/.classpath"))
911+
(ht ("globPattern" "**/settings/*.prefs"))))))))))))
902912

903913
(defun lsp-java-spring-initializr ()
904914
"Emacs frontend for https://start.spring.io/."

0 commit comments

Comments
 (0)