From 7bbcbb7365ee328bf2c7da2f33d1ea392d54d895 Mon Sep 17 00:00:00 2001 From: binarycat Date: Mon, 24 Nov 2025 13:37:28 -0600 Subject: [PATCH 1/2] fix: use parent eglot-initialization-options when not in detached mode this allows user customization and similar. --- rustic-lsp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustic-lsp.el b/rustic-lsp.el index 57871ba..ee36a52 100644 --- a/rustic-lsp.el +++ b/rustic-lsp.el @@ -134,7 +134,7 @@ with `lsp-rust-switch-server'." (if (or (null rustic-enable-detached-file-support) (null buffer-file-name) (rustic-buffer-crate t)) - eglot--{} + (cl-call-next-method) (list :detachedFiles (vector (file-local-name (file-truename buffer-file-name)))))) From ff86e09c13b3d55c6131a2c0fe68b81d4aaa0937 Mon Sep 17 00:00:00 2001 From: binarycat Date: Mon, 24 Nov 2025 13:50:25 -0600 Subject: [PATCH 2/2] fix: also pass eglot-workspace-configuration as initializationOptions otherwise some config options won't function properly. --- rustic-lsp.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rustic-lsp.el b/rustic-lsp.el index ee36a52..94a6ae4 100644 --- a/rustic-lsp.el +++ b/rustic-lsp.el @@ -123,7 +123,13 @@ with `lsp-rust-switch-server'." (when (symbolp (car mode)) (eq (car mode) 'rust-mode))) eglot-server-programs))))) - (add-to-list 'eglot-server-programs `((rustic-mode :language-id "rust") . (eglot-rust-analyzer . ,rustic-analyzer-command))))) + (add-to-list 'eglot-server-programs + (append '((rustic-mode :language-id "rust") + eglot-rust-analyzer) + rustic-analyzer-command + (:initializationOptions + (lambda (_) + (plist-get eglot-workspace-configuration :rust-analyzer))))))) (with-eval-after-load 'eglot (defclass eglot-rust-analyzer (eglot-lsp-server) ()