Refactor ruby hooks

This commit is contained in:
Henrik Lissner 2020-04-29 00:09:12 -04:00
parent 8cc8033a06
commit 7a73bb7ce7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -22,6 +22,7 @@
(add-hook 'ruby-mode-local-vars-hook #'lsp!)) (add-hook 'ruby-mode-local-vars-hook #'lsp!))
(after! inf-ruby (after! inf-ruby
(add-hook 'inf-ruby-mode-hook #'doom-mark-buffer-as-real-h)
;; switch to inf-ruby from compile if we detect a breakpoint has been hit ;; switch to inf-ruby from compile if we detect a breakpoint has been hit
(add-hook 'compilation-filter-hook #'inf-ruby-auto-enter)) (add-hook 'compilation-filter-hook #'inf-ruby-auto-enter))
@ -172,8 +173,8 @@
(use-package! projectile-rails (use-package! projectile-rails
:when (featurep! +rails) :when (featurep! +rails)
:hook (((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) :hook ((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode)
((inf-ruby-mode projectile-rails-server-mode) . doom-mark-buffer-as-real-h)) :hook (projectile-rails-server-mode . doom-mark-buffer-as-real-h)
:init :init
(setq inf-ruby-console-environment "development") (setq inf-ruby-console-environment "development")
(when (featurep! :lang web) (when (featurep! :lang web)