blob: 6e4e43bcb52e4d776810e528b38b79e4d3841bb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
;;; rust.el -*- lexical-binding: t; -*-
;;;
;;; Author: Jakob L. Kreuze <zerodaysfordays@sdf.org>
;;; URL: https://git.sr.ht/~jakob/.emacs.d/
;;;
;;; Configuration of a development environment for the Rust programming
;;; language.
;;;
;; Enable flycheck.
(use-package flycheck-rust
:after rust-mode
:hook
(flycheck-mode . flycheck-rust-setup)
(rust-mode . flycheck-mode))
;; Enable company, ElDoc, and racer.
(use-package racer
:init
(setq racer-cmd "~/.cargo/bin/racer")
(setq racer-rust-src-path "~/Code/rust/src")
:hook
(racer-mode . eldoc-mode)
(racer-mode . company-mode))
(use-package rust-mode
:hook
(rust-mode . racer-mode)
;; Run 'rustfmt' automatically.
:init
(setq rust-format-on-save t))
;; Enable keybindings for working with Cargo.
(use-package cargo
:hook (rust-mode . cargo-minor-mode))
|
© 2015 - 2026 Jakob L. Kreuze