summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-04-16 19:45:34 -0700
committerFranck Cuny <franck@fcuny.net>2024-04-16 19:45:34 -0700
commitbc16a92ae47c738bbf3dc80d46e2cb50ab9669b9 (patch)
tree4100c6a11f6dd12bd228a46e41ff067bc76a1759
parentfix configuration for dired (diff)
downloademacs.d-bc16a92ae47c738bbf3dc80d46e2cb50ab9669b9.tar.gz
configuration related to rust
Diffstat (limited to '')
-rw-r--r--config/init-programming.el1
-rw-r--r--config/init-rust.el27
2 files changed, 28 insertions, 0 deletions
diff --git a/config/init-programming.el b/config/init-programming.el
index 984485b..f9720c8 100644
--- a/config/init-programming.el
+++ b/config/init-programming.el
@@ -81,6 +81,7 @@
 (require 'init-elisp)
 (require 'init-lsp)
 (require 'init-go)
+(require 'init-rust)
 (require 'init-nix)
 (require 'init-python)
 (require 'init-ruby)
diff --git a/config/init-rust.el b/config/init-rust.el
new file mode 100644
index 0000000..8aa8034
--- /dev/null
+++ b/config/init-rust.el
@@ -0,0 +1,27 @@
+;;; init-rust.el --- Configuration for rust -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;; configuration for rust
+
+;;; Code:
+
+(use-package rust-mode
+  :ensure t
+  :defer t
+  :hook ((rust-mode . eglot-ensure))
+  :mode ("\\.rs\\'" . rust-mode)
+  :custom
+  (rust-format-on-save t))
+
+(use-package cargo-mode
+  :ensure t
+  :defer t
+  :hook (rust-mode . cargo-minor-mode)
+  :custom
+  (compilation-scroll-output t))
+
+(provide 'init-rust)
+
+;;; init-rust.el ends here