mirror of
https://github.com/Foltik/dotfiles
synced 2025-04-03 01:42:16 -04:00
Add rust facilities to emacs and fix yasnippet
This commit is contained in:
parent
c22f35cbe6
commit
ee44e76842
@ -713,15 +713,13 @@ and activate it in =prog-mode=
|
|||||||
Yasnippet adds support for custom snippets
|
Yasnippet adds support for custom snippets
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
|
:commands yas-minor-mode
|
||||||
:hook (prog-mode . yas-minor-mode)
|
:hook (prog-mode . yas-minor-mode)
|
||||||
:custom
|
:custom
|
||||||
(yas-snippet-dirs
|
(yas-snippet-dirs
|
||||||
'("~/.emacs.d/snippets"
|
'("~/.emacs.d/snippets"
|
||||||
"~/.emacs.d/elpa/yasnippet-snippets-0.6/snippets"))
|
"~/.emacs.d/elpa/yasnippet-snippets-0.6/snippets")))
|
||||||
:config
|
;;;(use-package yasnippet-snippets)
|
||||||
(progn
|
|
||||||
(use-package yasnippet-snippets)
|
|
||||||
(yas-reload-all)))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Git
|
** Git
|
||||||
@ -899,7 +897,31 @@ cdlatex adds better TeX-specific template expansions and other niceties.
|
|||||||
*** Rust
|
*** Rust
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package rust-mode
|
(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
|
#+END_SRC
|
||||||
*** C/C++
|
*** C/C++
|
||||||
**** Irony
|
**** Irony
|
||||||
|
11
packages.yml
11
packages.yml
@ -80,3 +80,14 @@ Fonts:
|
|||||||
Themes:
|
Themes:
|
||||||
- paper-icon-theme:
|
- paper-icon-theme:
|
||||||
source: aur
|
source: aur
|
||||||
|
|
||||||
|
Rust:
|
||||||
|
- rustup
|
||||||
|
- rust-src:
|
||||||
|
source: rustup
|
||||||
|
- clippy-preview:
|
||||||
|
source: rustup
|
||||||
|
- racer:
|
||||||
|
source: cargo
|
||||||
|
- rustfmt:
|
||||||
|
source: cargo
|
||||||
|
Loading…
Reference in New Issue
Block a user