summary refs log tree commit diff
path: root/emacs/custom/my-lang-rust.el
blob: e6374a765c9527449dacd925b9b27bc5aca5e072 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;; my-lang-rust.el --- configure emacs for rust -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;;; Code:

(require 'rustic)
(require 'lsp-rust)

(setq lsp-rust-analyzer-cargo-watch-enable t)
(setq lsp-rust-analyzer-proc-macro-enable t)
(setq lsp-rust-full-docs t)
(setq lsp-rust-server 'rust-analyzer)

(setq rustic-format-on-save t)
(setq rustic-lsp-client 'lsp-mode)
(setq rustic-lsp-server 'rust-analyzer)

(add-hook 'rusti-mode-hook #'lsp-deferred)

(provide 'my-lang-rust)

;;; my-lang-rust.el ends here