Add rake
package to the ruby layer
This commit is contained in:
parent
be2c471397
commit
c2ec8e57c9
|
@ -16,12 +16,14 @@
|
|||
- [[Tests][Tests]]
|
||||
- [[RSpec-mode][RSpec-mode]]
|
||||
- [[Ruby-test-mode][Ruby-test-mode]]
|
||||
- [[Rake][Rake]]
|
||||
|
||||
* Description
|
||||
This layer provides support for the Ruby language with the following feature:
|
||||
- version manager (rbenv, rvm or chruby)
|
||||
- integration with bundler
|
||||
- test runner (ruby-test and rspec)
|
||||
- rake runner
|
||||
- linter (rubocop)
|
||||
- interactive REPL and code navigation (robe)
|
||||
|
||||
|
@ -162,3 +164,11 @@ When =ruby-test-runner= equals =ruby-test=.
|
|||
|-------------+---------------------|
|
||||
| ~SPC m t b~ | run test file |
|
||||
| ~SPC m t t~ | run test at pointer |
|
||||
** Rake
|
||||
|
||||
| Key binding | Description |
|
||||
|-------------+---------------------------------|
|
||||
| ~SPC m k k~ | Runs rake |
|
||||
| ~SPC m k r~ | Re-runs the last rake task |
|
||||
| ~SPC m k R~ | Regenerates the rake cache |
|
||||
| ~SPC m k f~ | Finds definition of a rake task |
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
ruby-tools
|
||||
rvm
|
||||
smartparens
|
||||
rake
|
||||
))
|
||||
(if ruby-enable-enh-ruby-mode
|
||||
(add-to-list 'ruby-packages 'enh-ruby-mode)
|
||||
|
@ -257,3 +258,16 @@
|
|||
:post-handlers '(sp-ruby-post-handler
|
||||
(spacemacs/smartparens-pair-newline-and-indent "RET"))
|
||||
:suffix ""))))
|
||||
|
||||
(defun ruby/init-rake ()
|
||||
(use-package rake
|
||||
:defer t
|
||||
:config
|
||||
(progn
|
||||
(setq rake-cache-file (concat spacemacs-cache-directory "rake.cache"))
|
||||
(dolist (mode '(ruby-mode enh-ruby-mode))
|
||||
(spacemacs/set-leader-keys-for-major-mode mode
|
||||
"kk" 'rake
|
||||
"kr" 'rake-rerun
|
||||
"kR" 'rake-regenerate-cache
|
||||
"kf" 'rake-find-task)))))
|
||||
|
|
Loading…
Reference in a new issue