diff options
Diffstat (limited to '')
-rw-r--r-- | emacs/custom/my-lang-rust.el | 19 | ||||
-rw-r--r-- | emacs/init.el | 1 |
2 files changed, 20 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 diff --git a/emacs/init.el b/emacs/init.el index 0aa712d..0a4b12a 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -52,6 +52,7 @@ (require 'my-lsp) (require 'my-lang-go) (require 'my-lang-python) +(require 'my-lang-rust) (require 'my-buffers) (require 'my-git-extra) |