spacemacs/layers/!frameworks/ruby-on-rails/packages.el
syl20bnr 6b33031dc5 core: dotspacemacs-distribution, spacemacs-core layer and rename contrib
- Rename contrib directory to layers
- Add new variable dotspacemacs-distribution
- Move spacemacs layer to layers/!distribution
- New layer spacemacs-core in layers/!distribution
- User can now set dotspacemacs-distribution to spacemacs or
  spacemacs-core (default spacemacs)

spacemacs-core is very lightweight layer sufficient to build upon
spacemacs.
2015-09-07 23:44:43 -04:00

81 lines
2.9 KiB
EmacsLisp

;;; packages.el --- Ruby on Rails Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq ruby-on-rails-packages
'(
feature-mode
projectile-rails
))
(defun ruby-on-rails/init-projectile-rails ()
(use-package projectile-rails
:defer t
:init
(progn
(add-hook 'projectile-mode-hook 'projectile-rails-on))
:config
(progn
(spacemacs|diminish projectile-rails-mode "" " RoR")
;; Find files
(evil-leader/set-key-for-mode 'enh-ruby-mode
"mrfa" 'projectile-rails-find-locale
"mrfc" 'projectile-rails-find-controller
"mrfe" 'projectile-rails-find-environment
"mrff" 'projectile-rails-find-feature
"mrfh" 'projectile-rails-find-helper
"mrfi" 'projectile-rails-find-initializer
"mrfj" 'projectile-rails-find-javascript
"mrfl" 'projectile-rails-find-lib
"mrfm" 'projectile-rails-find-model
"mrfn" 'projectile-rails-find-migration
"mrfo" 'projectile-rails-find-log
"mrfp" 'projectile-rails-find-spec
"mrfr" 'projectile-rails-find-rake-task
"mrfs" 'projectile-rails-find-stylesheet
"mrft" 'projectile-rails-find-test
"mrfu" 'projectile-rails-find-fixture
"mrfv" 'projectile-rails-find-view
"mrfy" 'projectile-rails-find-layout
"mrf@" 'projectile-rails-find-mailer
;; Goto file
"mrgc" 'projectile-rails-find-current-controller
"mrgd" 'projectile-rails-goto-schema
"mrge" 'projectile-rails-goto-seeds
"mrgh" 'projectile-rails-find-current-helper
"mrgj" 'projectile-rails-find-current-javascript
"mrgg" 'projectile-rails-goto-gemfile
"mrgm" 'projectile-rails-find-current-model
"mrgn" 'projectile-rails-find-current-migration
"mrgp" 'projectile-rails-find-current-spec
"mrgr" 'projectile-rails-goto-routes
"mrgs" 'projectile-rails-find-current-stylesheet
"mrgt" 'projectile-rails-find-current-test
"mrgu" 'projectile-rails-find-current-fixture
"mrgv" 'projectile-rails-find-current-view
"mrgz" 'projectile-rails-goto-spec-helper
"mrg." 'projectile-rails-goto-file-at-point
;; Rails external commands
"mrcc" 'projectile-rails-generate
"mri" 'projectile-rails-console
"mrr:" 'projectile-rails-rake
"mrxs" 'projectile-rails-server
;; Refactoring 'projectile-rails-mode
"mrRx" 'projectile-rails-extract-region)
;; Ex-commands
(evil-ex-define-cmd "A" 'projectile-toggle-between-implementation-and-test))))
(defun ruby-on-rails/init-feature-mode ()
"Initialize Cucumber feature mode"
(use-package feature-mode
:mode (("\\.feature\\'" . feature-mode))))