1
0
mirror of https://github.com/Foltik/dotfiles synced 2025-01-07 08:42:47 -05:00

Add rust facilities to emacs and fix yasnippet

This commit is contained in:
Jack Foltz 2018-12-21 11:02:05 -05:00
parent c22f35cbe6
commit ee44e76842
Signed by: foltik
GPG Key ID: D1F0331758D1F29A
2 changed files with 40 additions and 7 deletions

View File

@ -713,15 +713,13 @@ and activate it in =prog-mode=
Yasnippet adds support for custom snippets
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:commands yas-minor-mode
:hook (prog-mode . yas-minor-mode)
:custom
(yas-snippet-dirs
'("~/.emacs.d/snippets"
"~/.emacs.d/elpa/yasnippet-snippets-0.6/snippets"))
:config
(progn
(use-package yasnippet-snippets)
(yas-reload-all)))
'("~/.emacs.d/snippets"
"~/.emacs.d/elpa/yasnippet-snippets-0.6/snippets")))
;;;(use-package yasnippet-snippets)
#+END_SRC
** Git
@ -899,7 +897,31 @@ cdlatex adds better TeX-specific template expansions and other niceties.
*** Rust
#+BEGIN_SRC emacs-lisp
(use-package rust-mode
:mode "\\.rs\\'")
:mode "\\.rs\\'"
:general
(foltz-major-def
:keymaps 'rust-mode-map
"TAB" 'rust-format-buffer))
(use-package flycheck-rust
:pin melpa
:hook (rust-mode . flycheck-rust-setup))
(use-package racer
:hook ((rust-mode . racer-mode)
(rust-mode . eldoc-mode))
:custom
(racer-cmd "~/.cargo/bin/racer")
(racer-rust-src-path "~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src"))
(use-package cargo
:hook (rust-mode . cargo-minor-mode)
:general
(foltz-major-def
:keymaps 'rust-mode-map
"b" 'cargo-process-build
"r" 'cargo-process-run
"t" 'cargo-process-test))
#+END_SRC
*** C/C++
**** Irony

View File

@ -80,3 +80,14 @@ Fonts:
Themes:
- paper-icon-theme:
source: aur
Rust:
- rustup
- rust-src:
source: rustup
- clippy-preview:
source: rustup
- racer:
source: cargo
- rustfmt:
source: cargo