Updated ensime bindings to better fit with spacemacs #600
Conversation
I like this. +1 |
"mro" 'ensime-refactor-organize-imports | ||
"mrr" 'ensime-refactor-rename | ||
"mrt" 'ensime-import-type-at-point | ||
|
syl20bnr
Feb 15, 2015
Owner
It is not in the conventions for now but the refactoring is planned to be on SPC m R
instead of SPC m r
.
It is not in the conventions for now but the refactoring is planned to be on SPC m R
instead of SPC m r
.
"mbr" 'ensime-sbt-do-run | ||
"mbs" 'ensime-sbt-switch | ||
"mbt" 'ensime-sbt-do-test-quick | ||
|
syl20bnr
Feb 15, 2015
Owner
I like mb
for sbt commands!
I like mb
for sbt commands!
|
||
"mti" 'ensime-goto-impl | ||
"mtt" 'ensime-goto-test | ||
|
syl20bnr
Feb 15, 2015
Owner
mt
is reserved for tests.
At first sight these commands should go behind mg
mt
is reserved for tests.
At first sight these commands should go behind mg
bjarkevad
Feb 16, 2015
Author
Contributor
So ensime-goto-{test,impl}
is used to jump between test and implementation files, so it's not a mismatch with spacemacs conventions if we want to keep them this way.
So ensime-goto-{test,impl}
is used to jump between test and implementation files, so it's not a mismatch with spacemacs conventions if we want to keep them this way.
I will wait a bit before merging it because I have to read the doc of each command and maybe play a bit with them in order to make them match with what we have in the other layers. Each new added tool is a great opportunity to discover new commands so this PR has a lot of value. Thank you ! |
Thanks for the feedback! |
@@ -47,6 +47,78 @@ which require an initialization must be listed explicitly in the list.") | |||
(kbd "n") 'forward-button | |||
(kbd "N") 'backward-button) | |||
|
|||
(defun ensime-gen-and-reload() |
bjarkevad
Feb 16, 2015
Author
Contributor
I've added a new function which generates an .ensime and reloads ensime, which is useful when the project changes. Sometimes it's also necessary to rm -r .ensime_cache
in the project root to force ensime to notice changes to e.g. dependencies.
I've added a new function which generates an .ensime and reloads ensime, which is useful when the project changes. Sometimes it's also necessary to rm -r .ensime_cache
in the project root to force ensime to notice changes to e.g. dependencies.
"mg" 'ensime-edit-definition | ||
|
||
"m." 'ensime-gen-and-reload | ||
"m," 'ensime |
bjarkevad
Feb 16, 2015
Author
Contributor
Using , ,
and , .
for ensime-server commands. Could probably be moved to some more mnemonic binding.
Using , ,
and , .
for ensime-server commands. Could probably be moved to some more mnemonic binding.
) | ||
|
||
(evil-leader/set-key-for-mode 'scala-mode | ||
"mg" 'ensime-edit-definition |
bjarkevad
Feb 16, 2015
Author
Contributor
This is a temporary binding, but the function should be included in the bindings
This is a temporary binding, but the function should be included in the bindings
Excellent PR ! Cherry-picked into |
@bjarkevad, forgot to mention that I decided to put refactoring bindings under CC @bru We have 2 solutions:
I would go with 1) to keep consistency with |
Considered the fact that currently the ruby layer has 1 refactor command vs
|
|
Essentially any view in a rails project.
|
I never thought about this... this is a big limitation, Extending |
I've updated the bindings for ensime so they fit a bit better with spacemacs, but rather than following spacemacs convetions I've pretty much just translated ensime's default bindings from
C-c C-{X} something
tospc m {X} something
.I'm not sure if this is the best idea, but it makes switching from normal emacs + ensime to spacemacs + ensime easier.