From 52d6ab9632c05768458bc687d1df43626837dcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Thu, 19 Dec 2019 23:05:26 +0100 Subject: [PATCH] rust: note on installing rust-src --- init.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index 8ead8f3..fff8aec 100644 --- a/init.el +++ b/init.el @@ -751,18 +751,19 @@ inserted between the braces between the braces." ;;; ### Rust ### -;;; If you have Emacs 26 than you need -;;; [Rustup](https://www.rust-lang.org/learn/get-started) and using -;;; Rustup you should install component -;;; [rls](https://github.com/rust-lang/rls) with the command +;;; If you have Emacs 26 than you need [Rustup] and using Rustup you +;;; should install components [rls](https://github.com/rust-lang/rls) +;;; and `rust-src` with the command ;;; ;;; ``` -;;; $ rustup component add rls +;;; $ rustup component add rls rust-src ;;; ``` ;;; ;;; For **tab completion** and **lsp** support add [my common settings ;;; for programming modes] and then add +;;; [Rustup]: https://www.rust-lang.org/learn/get-started + (when (>= emacs-major-version 26) (defun my-rustic-mode-hook-fn () "needed for lsp-format-buffer to indent with 4 spaces" @@ -776,9 +777,15 @@ inserted between the braces between the braces." :hook (rustic-mode . my-rustic-mode-hook-fn))) ;;; But if you have Emacs older than 26 than you should install -;;; [racer](https://github.com/racer-rust/racer) and for **tab -;;; completion** add [my common settings for programming modes] and -;;; then add +;;; [Rustup] and [racer](https://github.com/racer-rust/racer) and with +;;; Rustup install component `rust-src` with the command +;;; +;;; ``` +;;; $ rustup component add rust-src +;;; ``` +;;; +;;; for **tab completion** add [my common settings for programming +;;; modes] and then add (when (< emacs-major-version 26) (use-package cargo