This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/!frameworks/ruby-on-rails/packages.el

81 lines
2.9 KiB
EmacsLisp
Raw Normal View History

;;; 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
2015-07-06 07:32:22 +00:00
(setq ruby-on-rails-packages
'(
feature-mode
projectile-rails
))
2015-07-06 07:32:22 +00:00
(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))))
2015-07-06 07:32:22 +00:00
(defun ruby-on-rails/init-feature-mode ()
"Initialize Cucumber feature mode"
(use-package feature-mode
:mode (("\\.feature\\'" . feature-mode))))