Using new upstream commands

- Improve copy to clipboard
- changed and added a few commands keymap
This commit is contained in:
Diego Alvarez 2016-06-02 23:40:14 -07:00 committed by syl20bnr
parent d33507f42a
commit ed1c3d2d35
3 changed files with 23 additions and 10 deletions

View file

@ -194,17 +194,22 @@ disable it with
| ~SPC m g i~ | go to implementation |
| ~SPC m g t~ | go to test |
*** Print and yank types
|-------------+--------------------------------|
| ~SPC m p f~ | print full type name at point |
| ~SPC m p t~ | print short type name at point |
| ~SPC m y f~ | yank full type name at point |
| ~SPC m y t~ | yank short type name at point |
*** Documentation, Inspect
| Key Binding | Description |
|-------------+----------------------------------------|
| ~SPC m h h~ | show documentation for symbol at point |
| ~SPC m h u~ | show uses for symbol at point |
| ~SPC m h t~ | print type at point |
| ~SPC m i i~ | inspect type at point |
| ~SPC m i I~ | inspect type in other frame |
| ~SPC m i p~ | inspect project package |
| ~SPC m i y~ | yank type at point |
*** Server

View file

@ -103,9 +103,11 @@ point to the position of the join."
(setq-local flyspell-generic-check-word-predicate 'scala/flyspell-verify))
(defun scala/yank-type-at-point ()
"Yank to kill ring and print type at point to the minibuffer without package name."
"Yank to kill ring and print short type name at point to the minibuffer."
(interactive)
(let* ((type (ensime-rpc-get-type-at-point))
(shortname (ensime-type-short-name-with-args type)))
(kill-new shortname)
(message shortname)))
(ensime-type-at-point t nil))
(defun scala/yank-type-at-point-full-name ()
"Yank to kill ring and print full type name at point to the minibuffer."
(interactive)
(ensime-type-at-point t t))

View file

@ -94,7 +94,9 @@
("mn" . "scala/ensime")
("mr" . "scala/refactor")
("mt" . "scala/test")
("ms" . "scala/repl")))
("mp" . "scala/print-type")
("ms" . "scala/repl")
("my" . "scala/yank")))
(spacemacs/declare-prefix-for-mode 'scala-mode (car prefix) (cdr prefix)))
(spacemacs/set-leader-keys-for-major-mode 'scala-mode
@ -136,12 +138,10 @@
"hh" 'ensime-show-doc-for-symbol-at-point
"hu" 'ensime-show-uses-of-symbol-at-point
"ht" 'ensime-print-type-at-point
"ii" 'ensime-inspect-type-at-point
"iI" 'ensime-inspect-type-at-point-other-frame
"ip" 'ensime-inspect-project-package
"iy" 'scala/yank-type-at-point
"nF" 'ensime-reload-open-files
"ns" 'ensime
@ -157,6 +157,9 @@
"rt" 'ensime-import-type-at-point
"rv" 'ensime-refactor-diff-extract-local
"pf" 'ensime-type-at-point-full-name
"pt" 'ensime-type-at-point
"ta" 'ensime-sbt-do-test-dwim
"tr" 'ensime-sbt-do-test-quick-dwim
"tt" 'ensime-sbt-do-test-only-dwim
@ -168,6 +171,9 @@
"sr" 'ensime-inf-eval-region
"sR" 'ensime-inf-eval-region-switch
"yt" 'scala/yank-type-at-point
"yf" 'scala/yank-type-at-point-full-name
"z" 'ensime-expand-selection-command
)