aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/overlays/kookie/emacs/rust/default.el
blob: 0dc40909d93e8d941d6144b714f511f8d6e3f50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;; rust.el
;;   Configure rust development via lsp and rust-analyzer
;;
;; This mode enables IDE-like integration for writing and editing rust
;; mode, as well as projectile.el, a utility to mark projects in a
;; large set of directories such as a monorepo.  This mode depends on
;; all projects in this tree following the projectile conventions.
;;
;;
;; This file is part of LIBKOOKIE, a collection of nix expressions.
;; LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE

(provide 'rust)

;;; Use rust-analyzer for completions
(setq lsp-rust-server 'rust-analyzer)

;;; Start lsp mode for Rust buffers
(add-hook 'rust-mode-hook #'lsp)

;;; Use projectile to find project roots
(projectile-mode t)
(setq lsp-auto-guess-root t)