rust: note on installing rust-src

This commit is contained in:
Łukasz Pankowski 2019-12-19 23:05:26 +01:00
parent 43a4b16d75
commit 52d6ab9632

23
init.el
View File

@ -751,18 +751,19 @@ inserted between the braces between the braces."
;;; ### Rust ### ;;; ### Rust ###
;;; If you have Emacs 26 than you need ;;; If you have Emacs 26 than you need [Rustup] and using Rustup you
;;; [Rustup](https://www.rust-lang.org/learn/get-started) and using ;;; should install components [rls](https://github.com/rust-lang/rls)
;;; Rustup you should install component ;;; and `rust-src` with the command
;;; [rls](https://github.com/rust-lang/rls) with the command
;;; ;;;
;;; ``` ;;; ```
;;; $ rustup component add rls ;;; $ rustup component add rls rust-src
;;; ``` ;;; ```
;;; ;;;
;;; For **tab completion** and **lsp** support add [my common settings ;;; For **tab completion** and **lsp** support add [my common settings
;;; for programming modes] and then add ;;; for programming modes] and then add
;;; [Rustup]: https://www.rust-lang.org/learn/get-started
(when (>= emacs-major-version 26) (when (>= emacs-major-version 26)
(defun my-rustic-mode-hook-fn () (defun my-rustic-mode-hook-fn ()
"needed for lsp-format-buffer to indent with 4 spaces" "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))) :hook (rustic-mode . my-rustic-mode-hook-fn)))
;;; But if you have Emacs older than 26 than you should install ;;; But if you have Emacs older than 26 than you should install
;;; [racer](https://github.com/racer-rust/racer) and for **tab ;;; [Rustup] and [racer](https://github.com/racer-rust/racer) and with
;;; completion** add [my common settings for programming modes] and ;;; Rustup install component `rust-src` with the command
;;; then add ;;;
;;; ```
;;; $ rustup component add rust-src
;;; ```
;;;
;;; for **tab completion** add [my common settings for programming
;;; modes] and then add
(when (< emacs-major-version 26) (when (< emacs-major-version 26)
(use-package cargo (use-package cargo