Set up Emacs for Rust development

This commit is contained in:
Jeremy Dormitzer 2019-11-04 10:03:26 -05:00
parent 0dbc8ee912
commit 9ae770ae2a

View File

@ -1526,6 +1526,24 @@ Use LSP if [[https://github.com/mads-hartmann/bash-language-server][bash-languag
#+BEGIN_SRC emacs-lisp
(add-hook 'ruby-mode-hook #'lsp)
#+END_SRC
* Rust
#+BEGIN_SRC emacs-lisp
(use-package lsp-rust
:after (lsp-mode rust-mode)
:config
(add-hook 'rust-mode-hook #'lsp))
(use-package rust-mode
:mode "\\.rs\\'"
:general
(rust-mode-map "C-c <tab>" #'rust-format-buffer))
(use-package cargo
:after (rust-mode)
:config
(add-hook 'rust-mode-hook #'cargo-minor-mode))
#+END_SRC
* CSVs
#+BEGIN_SRC emacs-lisp
(use-package csv-mode