Skip to content

Commit ff86e09

Browse files
committed
fix: also pass eglot-workspace-configuration as initializationOptions
otherwise some config options won't function properly.
1 parent 7bbcbb7 commit ff86e09

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rustic-lsp.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ with `lsp-rust-switch-server'."
123123
(when (symbolp (car mode))
124124
(eq (car mode) 'rust-mode)))
125125
eglot-server-programs)))))
126-
(add-to-list 'eglot-server-programs `((rustic-mode :language-id "rust") . (eglot-rust-analyzer . ,rustic-analyzer-command)))))
126+
(add-to-list 'eglot-server-programs
127+
(append '((rustic-mode :language-id "rust")
128+
eglot-rust-analyzer)
129+
rustic-analyzer-command
130+
(:initializationOptions
131+
(lambda (_)
132+
(plist-get eglot-workspace-configuration :rust-analyzer)))))))
127133

128134
(with-eval-after-load 'eglot
129135
(defclass eglot-rust-analyzer (eglot-lsp-server) ()

0 commit comments

Comments
 (0)