From 21c3f1ef3074884b035a105616f721ee24422e21 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Wed, 15 Feb 2023 13:44:06 +0100 Subject: [PATCH] Work around jdt-ls not following the spec --- modules/development/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/development/default.nix b/modules/development/default.nix index e5f5af85..ca8d7a19 100644 --- a/modules/development/default.nix +++ b/modules/development/default.nix @@ -40,6 +40,13 @@ "SPC F" '(eglot-format :which-key "Format buffer") "SPC r" '(eglot-rename :which-key "Rename symbol") ) + :config + ;;; eclipse-jdt breaks the spec which in turn breaks code actions + ;;; This behaviour can't be disabled and needs to be worked around + (cl-defmethod eglot-execute-command + (_server (_cmd (eql java.apply.workspaceEdit)) arguments) + "Eclipse JDT breaks spec and replies with edits as arguments." + (mapc #'eglot--apply-workspace-edit arguments)) ) ;; Forth syntax support