;;; lk/ruby --- ruby related customizations
;;;; Commentary:
;;; Code:
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile" . ruby-mode))


(custom-set-variables
 '(inf-ruby-default-implementation "foreman")
 '(inf-ruby-implementations
   (quote
    (("ruby" . "irb --prompt default --noreadline -r irb/completion")
     ("foreman" . "bundle exec foreman run rails c")
     ("pry" . "pry")))))

(add-hook 'ruby-mode-hook #'linum-mode)
(add-hook 'ruby-mode-hook #'inf-ruby-minor-mode)

(setq-default ruby-indent-level 2)

(provide 'lk/ruby)
;;; ruby.el ends here

;;; lk/ruby --- ruby related customizations
;;;; Commentary:
;;; Code:
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile" . ruby-mode))


(add-hook 'ruby-mode-hook (lambda ()
                            (linum-mode)
                            (in-ruby-minor-mode)
                            (local-set-key (kbd "C-c r")
                                           'rubocop-autocorrect-current-file)))

(setq-default ruby-indent-level 2)

(provide 'lk/ruby)
;;; ruby.el ends here

Add a shortcut for rubocop's autocorrect
Add a shortcut for rubocop's autocorrect

lukaszkorecki/cult-leader