fix rails server lag

This commit is contained in:
Otávio Schwanck 2020-05-16 18:13:44 -03:00
parent 375faedb1b
commit 8bb5cd2c62
2 changed files with 13 additions and 1 deletions

View file

@ -13,6 +13,7 @@
- [[#windows][Windows]]
- [[#appendix][Appendix]]
- [[#commands][Commands]]
- [[#rails-server][Rails Server]]
* Description
This module add Ruby and optional Ruby on Rails support to Emacs.
@ -88,4 +89,14 @@ The rspec-mode prefix is =SPC m t=. Here is some examples:
| command | key / ex command | description |
|-----------------------+------------------+-----------------------------------|
| ~rspec-verify~ | =SPC m t v= | Runs rspec on current file |
| ~rspec-verify-method~ | =SPC m t f= | Runs rspec for the item on cursor |
| ~rspec-verify-method~ | =SPC m t s= | Runs rspec for the item on cursor |
** Rails Server
By default, doom has disabled stdout from rails server to prevent emacs lag and performance issues. You can enable by adding:
#+BEGIN_SRC elisp
;; On ~/.doom.d/config.el
(setq projectile-rails-custom-server-command nil)
#+END_SRC
Also, you can change =bundle exec spring rails server= to another command, like docker.

View file

@ -183,6 +183,7 @@
:hook (projectile-rails-mode . auto-insert-mode)
:init
(setq auto-insert-query nil)
(setq projectile-rails-custom-server-command "bundle exec spring rails server --no-log-to-stdout")
(setq inf-ruby-console-environment "development")
(when (featurep! :lang web)
(add-hook 'web-mode-hook #'projectile-rails-mode))