summary refs log tree commit diff
path: root/emacs/custom/my-lang-rust.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-09-17 14:12:44 -0700
committerFranck Cuny <franck@fcuny.net>2022-09-17 14:12:44 -0700
commita428e557ce045fb798f8b770beba10637dacdcaa (patch)
tree4809f554867f0b03f8e89b1756111ff2ca8e56f3 /emacs/custom/my-lang-rust.el
parentref(email): remove configuration for notmuch (diff)
downloademacs.d-a428e557ce045fb798f8b770beba10637dacdcaa.tar.gz
feat(lang/rust): configure Emacs for rust
Change-Id: Iaaccc75333b8b36e2fdb0ae4a6eb84408eb61300
Diffstat (limited to 'emacs/custom/my-lang-rust.el')
-rw-r--r--emacs/custom/my-lang-rust.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/emacs/custom/my-lang-rust.el b/emacs/custom/my-lang-rust.el
new file mode 100644
index 0000000..eb8e9a5
--- /dev/null
+++ b/emacs/custom/my-lang-rust.el
@@ -0,0 +1,19 @@
+;;; 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 rustic-lsp-server 'rust-analyzer)
+(setq rustic-lsp-client 'lsp-mode)
+(setq rustic-format-on-save t)
+
+(add-hook 'rustic-mode-hook #'lsp-rust-analyzer-inlay-hints-mode)
+
+(provide 'my-lang-rust)
+
+;;; my-lang-rust.el ends here