rust: add a keybinding for `jump to definition`
This commit is contained in:
parent
e3f23ea920
commit
9b0ae1d214
|
@ -49,3 +49,4 @@ procedure, look [[https://github.com/racer-rust/emacs-racer][here]].
|
|||
| ~SPC m c d~ | generate documentation with Cargo |
|
||||
| ~SPC m c x~ | execute the project with Cargo |
|
||||
| ~SPC m c C~ | remove build artifacts with Cargo |
|
||||
| ~SPC m g g~ | go jump to definition |
|
||||
|
|
|
@ -40,12 +40,15 @@
|
|||
;; Don't pair lifetime specifiers
|
||||
(sp-local-pair 'rust-mode "'" nil :actions nil))
|
||||
|
||||
(spacemacs/declare-prefix-for-mode 'rust-mode "mc" "cargo")
|
||||
(spacemacs/declare-prefix-for-mode 'rust-mode "mg" "goto")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'rust-mode
|
||||
"cc" 'spacemacs/rust-cargo-build
|
||||
"ct" 'spacemacs/rust-cargo-test
|
||||
"cd" 'spacemacs/rust-cargo-doc
|
||||
"cx" 'spacemacs/rust-cargo-run
|
||||
"cC" 'spacemacs/rust-cargo-clean))))
|
||||
"cC" 'spacemacs/rust-cargo-clean
|
||||
"gg" 'racer-find-definition))))
|
||||
|
||||
(defun rust/init-toml-mode ()
|
||||
(use-package toml-mode
|
||||
|
|
Loading…
Reference in New Issue