diff --git a/rustic-lsp.el b/rustic-lsp.el index 57871ba..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) () @@ -134,7 +140,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))))))