summary refs log tree commit diff
path: root/emacs/custom/my-lang-rust.el
diff options
context:
space:
mode:
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