[scala] add keybinding for running Test / compile in SBT (#15372)

This commit is contained in:
Keith Pinson 2022-02-22 11:37:17 -05:00 committed by GitHub
parent 011b1454e1
commit e9adfe9122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

View file

@ -3430,6 +3430,8 @@ files (thanks to Daniel Nicolai)
- ~SPC c s d~ Copy rpms to the phone
- ~SPC c s i~ Install rpms into target
**** Scala
- Shortcut key for compiling tests in SBT without running them (~Test / compile~)
(thanks to Keith Pinson)
- Shortcut keys for common/standard SBT commands (~scalafmtAll~, ~compile~ and ~test~)
(thanks to Keith Pinson)
- Remove long-deprecated Ensime support (thanks to Keith Pinson)

View file

@ -129,10 +129,11 @@ Additional major mode key bindings are populated by LSP and DAP.
** sbt
| Key binding | Description |
|-------------+--------------------------|
| ~SPC m b .~ | SBT transient state |
| ~SPC m b b~ | SBT command |
| ~SPC m b c~ | Run ~compile~ in SBT |
| ~SPC m b t~ | Run ~test~ in SBT |
| ~SPC m b =~ | Run ~scalafmtAll~ in SBT |
| Key binding | Description |
|-------------+-----------------------------|
| ~SPC m b .~ | SBT transient state |
| ~SPC m b b~ | SBT command |
| ~SPC m b c~ | Run ~compile~ in SBT |
| ~SPC m b t~ | Run ~test~ in SBT |
| ~SPC m b T~ | Run ~Test / compile~ in SBT |
| ~SPC m b =~ | Run ~scalafmtAll~ in SBT |

View file

@ -82,3 +82,8 @@ point to the position of the join."
"Run `test' via SBT"
(interactive)
(sbt-command "test"))
(defun spacemacs/scala-sbt-compile-test ()
"Compile `test' via SBT"
(interactive)
(sbt-command "Test / compile"))

View file

@ -61,6 +61,7 @@
"bb" 'sbt-command
"bc" #'spacemacs/scala-sbt-compile
"bt" #'spacemacs/scala-sbt-test
"bT" #'spacemacs/scala-sbt-compile-test
"b=" #'spacemacs/scala-sbt-scalafmt-all))))
(defun scala/init-scala-mode ()