mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/rust: check for racer binary + RUST_SRC_PATH first
This commit is contained in:
@ -24,13 +24,15 @@
|
||||
:init
|
||||
(add-hook! 'rust-mode-hook #'(racer-mode eldoc-mode flycheck-rust-setup))
|
||||
:config
|
||||
(setq racer-cmd (expand-file-name "racer/target/release/racer" +rust-src-dir)
|
||||
racer-rust-src-path (expand-file-name "rust/src/" +rust-src-dir))
|
||||
|
||||
(set! :jump 'rust-mode :definition #'racer-find-definition)
|
||||
(setq racer-cmd (or (executable-find "racer")
|
||||
(expand-file-name "racer/target/release/racer" +rust-src-dir))
|
||||
racer-rust-src-path (or (getenv "RUST_SRC_PATH")
|
||||
(expand-file-name "rust/src/" +rust-src-dir)))
|
||||
|
||||
(unless (file-exists-p racer-cmd)
|
||||
(warn "rust-mode: racer binary can't be found; auto-completion is disabled")))
|
||||
(warn "rust-mode: racer binary can't be found; auto-completion is disabled"))
|
||||
|
||||
(set! :jump 'rust-mode :definition #'racer-find-definition))
|
||||
|
||||
|
||||
(def-package! company-racer
|
||||
|
Reference in New Issue
Block a user