From 3f9bd60d854535ce77aa0b1f6e5aba5a7d06cc93 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 1 Dec 2020 12:01:03 -0500 Subject: feat(gs/emacs): Setup rust Change-Id: I98e2badbaec523e509a2d311a13d8d2d81f4cda8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2222 Reviewed-by: glittershark Tested-by: BuildkiteCI --- users/glittershark/emacs.d/config.el | 1 + users/glittershark/emacs.d/rust.el | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 users/glittershark/emacs.d/rust.el (limited to 'users') diff --git a/users/glittershark/emacs.d/config.el b/users/glittershark/emacs.d/config.el index 7dbd18b57407..60f3c167745e 100644 --- a/users/glittershark/emacs.d/config.el +++ b/users/glittershark/emacs.d/config.el @@ -33,6 +33,7 @@ (load! "cpp") (load! "lisp") (load! "clojure") +(load! "rust") (require 'tvl) diff --git a/users/glittershark/emacs.d/rust.el b/users/glittershark/emacs.d/rust.el new file mode 100644 index 000000000000..540ffcd82e98 --- /dev/null +++ b/users/glittershark/emacs.d/rust.el @@ -0,0 +1,8 @@ +;;; ../code/depot/users/glittershark/emacs.d/rust.el -*- lexical-binding: t; -*- + +(defun grfn/rust-setup () + (setq lsp-rust-server 'rust-analyzer) + (rust-enable-format-on-save) + (lsp)) + +(add-hook 'rust-mode-hook #'grfn/rust-setup) -- cgit 1.4.1