refactor!(rust): remove racer and default to +lsp
BREAKING CHANGE: Racer is no longer developed and its project page recommends using rust-analyzer instead. Moreover, users have reported issues trying to build/install it on recent versions of rust, so I've removed support for Racer from Doom, and now default solely to LSP for IDE features. Users that want these features will need to activate the module's +lsp flag (along with the :tools lsp module) and install rust-analyzer. See the module's README for instructions. Close: #6705 Co-authored-by: c1ttim <c1ttim@users.noreply.github.com>
This commit is contained in:
parent
20c50755e8
commit
63b0ebeda7
5 changed files with 3 additions and 25 deletions
|
@ -24,7 +24,6 @@ e.g. ~cargo~.
|
||||||
|
|
||||||
** Packages
|
** Packages
|
||||||
- [[doom-package:][rustic]]
|
- [[doom-package:][rustic]]
|
||||||
- [[doom-package:][racer]] unless [[doom-module:][+lsp]]
|
|
||||||
|
|
||||||
** Hacks
|
** Hacks
|
||||||
- rustic has been modified /not/ to automatically install lsp-mode or eglot if
|
- rustic has been modified /not/ to automatically install lsp-mode or eglot if
|
||||||
|
@ -52,10 +51,8 @@ rustup update --no-self-update
|
||||||
** Other Requirements
|
** Other Requirements
|
||||||
- If [[doom-module:][:editor format]] is enabled, you'll need =rustfmt=: ~$ rustup component add
|
- If [[doom-module:][:editor format]] is enabled, you'll need =rustfmt=: ~$ rustup component add
|
||||||
rustfmt-preview~.
|
rustfmt-preview~.
|
||||||
- Users without [[doom-module:][+lsp]] enabled will need [[doom-package:][racer]]: ~$ cargo +nightly install racer~
|
- Users with [[doom-module:][+lsp]] enabled will need [[https://rust-analyzer.github.io/][rust-analyzer]] (rls is supported, but
|
||||||
(with requires rust nightly edition).
|
[[https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html][deprecated]]).
|
||||||
- Users with [[doom-module:][+lsp]] enabled will need:
|
|
||||||
- =rust-analyzer= or =rls=
|
|
||||||
- Using the following commands requires:
|
- Using the following commands requires:
|
||||||
- ~cargo-process-check~: ~$ cargo install cargo-check~
|
- ~cargo-process-check~: ~$ cargo install cargo-check~
|
||||||
- ~cargo-process-clippy~: ~$ rustup component add clippy-preview~
|
- ~cargo-process-clippy~: ~$ rustup component add clippy-preview~
|
||||||
|
|
|
@ -7,14 +7,6 @@
|
||||||
"Return t if this is a cargo project."
|
"Return t if this is a cargo project."
|
||||||
(locate-dominating-file buffer-file-name "Cargo.toml"))
|
(locate-dominating-file buffer-file-name "Cargo.toml"))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +rust-racer-lookup-documentation (identifier)
|
|
||||||
"A `+lookup/documentation' handler for Rust + Racer."
|
|
||||||
(let ((buf (racer--describe identifier)))
|
|
||||||
(when buf
|
|
||||||
(pop-to-buffer buf)
|
|
||||||
t)))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Custom Cargo commands
|
;;; Custom Cargo commands
|
||||||
|
|
|
@ -76,12 +76,3 @@
|
||||||
(:prefix ("t" . "cargo test")
|
(:prefix ("t" . "cargo test")
|
||||||
:desc "all" "a" #'rustic-cargo-test
|
:desc "all" "a" #'rustic-cargo-test
|
||||||
:desc "current test" "t" #'rustic-cargo-current-test)))
|
:desc "current test" "t" #'rustic-cargo-current-test)))
|
||||||
|
|
||||||
|
|
||||||
(use-package! racer
|
|
||||||
:unless (modulep! +lsp)
|
|
||||||
:hook (rustic-mode-local-vars . racer-mode)
|
|
||||||
:config
|
|
||||||
(set-lookup-handlers! 'rustic-mode
|
|
||||||
:definition '(racer-find-definition :async t)
|
|
||||||
:documentation '+rust-racer-lookup-documentation))
|
|
||||||
|
|
|
@ -2,5 +2,3 @@
|
||||||
;;; lang/rust/packages.el
|
;;; lang/rust/packages.el
|
||||||
|
|
||||||
(package! rustic :pin "6eec9713876d698510ee3715698fd42c1571e307")
|
(package! rustic :pin "6eec9713876d698510ee3715698fd42c1571e307")
|
||||||
(unless (modulep! +lsp)
|
|
||||||
(package! racer :pin "1e63e98626737ea9b662d4a9b1ffd6842b1c648c"))
|
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue