init.el: Add support for cargo
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
61abe49789
commit
5b7fa8ae20
1 changed files with 42 additions and 2 deletions
44
init.el
44
init.el
|
@ -341,7 +341,45 @@
|
|||
"mrb" '(hlint-refactor-refactor-buffer
|
||||
:which-key "apply all hlint suggestions")
|
||||
"mrr" '(hlint-refactor-refactor-at-point
|
||||
:which-key "apply hlint suggestion under cursor")))
|
||||
:which-key "apply hlint suggestion under cursor")
|
||||
"mc." '(cargo-process-repeat
|
||||
:which-key "repeat the last cargo command")
|
||||
"mcC" '(cargo-process-clean
|
||||
:which-key "remove build artifacts with cargo")
|
||||
"mcX" '(cargo-process-run-example
|
||||
:which-key "execute project example with cargo")
|
||||
"mcc" '(cargo-process-build
|
||||
:which-key "compile project with cargo")
|
||||
"mcd" '(cargo-process-doc
|
||||
:which-key "generate documentation with cargo")
|
||||
"mcD" '(cargo-process-doc-open
|
||||
:which-key "open cargo docs")
|
||||
"mce" '(cargo-process-bench
|
||||
:which-key "run benchmarks with cargo")
|
||||
"mcf" '(cargo-process-fmt
|
||||
:which-key "format all project files with rustfmt")
|
||||
"mci" '(cargo-process-init
|
||||
:which-key "create a new project with cargo")
|
||||
"mcl" '(cargo-process-clippy
|
||||
:which-key "run linter with cargo")
|
||||
"mcn" '(cargo-process-new
|
||||
:which-key "create new project with cargo")
|
||||
"mco" '(cargo-process-current-file-tests
|
||||
:which-key "run all tests in current file with cargo")
|
||||
"mcs" '(cargo-process-search
|
||||
:which-key "search for packages on crates.io")
|
||||
"mct" '(cargo-process-current-test
|
||||
:which-key "run the current test with cargo")
|
||||
"mcu" '(cargo-process-update
|
||||
:which-key "update dependencies with cargo")
|
||||
"mcx" '(cargo-process-run
|
||||
:which-key "execute a process with cargo")
|
||||
"mcv" '(cargo-process-check
|
||||
:which-key "verify a project with cargo")
|
||||
"mt" '(cargo-process-test
|
||||
:which-key "run test with cargo")
|
||||
"m==" '(rust-format-buffer
|
||||
:which-key "rust reformat the buffer")))
|
||||
|
||||
;; custom functions
|
||||
(defun haskell-intero/insert-type ()
|
||||
|
@ -476,10 +514,12 @@
|
|||
:config
|
||||
(setq rust-format-on-save t))
|
||||
(use-package racer
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook
|
||||
((rust-mode . racer-mode)
|
||||
(racer-mode . eldoc-mode)
|
||||
(racer-mode . company-mode)))
|
||||
(use-package cargo
|
||||
:defer t)
|
||||
|
||||
;;; init.el ends
|
||||
|
|
Loading…
Reference in a new issue