From brotzeit/rustic@da3820d

Due to changes upstream, users can no longer use lsp-rust-server to
switch to rust-analyzer with rustic-mode. Use rustic-lsp-server instead.
This commit is contained in:
Henrik Lissner 2020-02-20 18:13:22 -05:00
parent 888d456dc9
commit cd3103b1be
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 6 additions and 7 deletions

View file

@ -78,7 +78,7 @@ You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] in
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;; in $DOOMDIR/config.el ;; in $DOOMDIR/config.el
(setq lsp-rust-server 'rust-analyzer) (setq rustic-lsp-server 'rust-analyzer)
#+END_SRC #+END_SRC
** Enabling elgot support for Rust ** Enabling elgot support for Rust

View file

@ -21,15 +21,13 @@
;; buffers, so we disable it, but only for evil users, because it ;; buffers, so we disable it, but only for evil users, because it
;; affects `forward-sexp' and its ilk. See ;; affects `forward-sexp' and its ilk. See
;; https://github.com/rust-lang/rust-mode/issues/288. ;; https://github.com/rust-lang/rust-mode/issues/288.
rustic-match-angle-brackets (not (featurep! :editor evil)) rustic-match-angle-brackets (not (featurep! :editor evil)))
;; We use the superior default client provided by `lsp-mode', not the
;; one rustic-mode sets up for us.
rustic-lsp-client nil)
(add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode)
(if (featurep! +lsp) (if (featurep! +lsp)
(add-hook 'rustic-mode-local-vars-hook #'lsp!) (add-hook 'rustic-mode-local-vars-hook #'lsp!)
(setq rustic-lsp-server nil)
(after! rustic-flycheck (after! rustic-flycheck
(add-to-list 'flycheck-checkers 'rustic-clippy))) (add-to-list 'flycheck-checkers 'rustic-clippy)))
@ -51,7 +49,8 @@
:desc "current test" "t" #'rustic-cargo-current-test)) :desc "current test" "t" #'rustic-cargo-current-test))
;; If lsp/elgot isn't available, it attempts to install lsp-mode via ;; If lsp/elgot isn't available, it attempts to install lsp-mode via
;; package.el. Doom manages its own dependencies so we disable that behavior. ;; package.el. Doom manages its own dependencies through straight so disable
;; this behavior to avoid package-not-initialized errors.
(defadvice! +rust--dont-install-packages-p (&rest _) (defadvice! +rust--dont-install-packages-p (&rest _)
:override #'rustic-install-lsp-client-p :override #'rustic-install-lsp-client-p
(message "No LSP server running"))) (message "No LSP server running")))

View file

@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/rust/packages.el ;;; lang/rust/packages.el
(package! rustic :pin "da3820de18") (package! rustic :pin "6dead0cdd4")
(unless (featurep! +lsp) (unless (featurep! +lsp)
(package! racer :pin "a0bdf778f0")) (package! racer :pin "a0bdf778f0"))