fix rails server lag
This commit is contained in:
parent
375faedb1b
commit
8bb5cd2c62
2 changed files with 13 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
- [[#windows][Windows]]
|
- [[#windows][Windows]]
|
||||||
- [[#appendix][Appendix]]
|
- [[#appendix][Appendix]]
|
||||||
- [[#commands][Commands]]
|
- [[#commands][Commands]]
|
||||||
|
- [[#rails-server][Rails Server]]
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
This module add Ruby and optional Ruby on Rails support to Emacs.
|
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 |
|
| command | key / ex command | description |
|
||||||
|-----------------------+------------------+-----------------------------------|
|
|-----------------------+------------------+-----------------------------------|
|
||||||
| ~rspec-verify~ | =SPC m t v= | Runs rspec on current file |
|
| ~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.
|
||||||
|
|
|
@ -183,6 +183,7 @@
|
||||||
:hook (projectile-rails-mode . auto-insert-mode)
|
:hook (projectile-rails-mode . auto-insert-mode)
|
||||||
:init
|
:init
|
||||||
(setq auto-insert-query nil)
|
(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")
|
(setq inf-ruby-console-environment "development")
|
||||||
(when (featurep! :lang web)
|
(when (featurep! :lang web)
|
||||||
(add-hook 'web-mode-hook #'projectile-rails-mode))
|
(add-hook 'web-mode-hook #'projectile-rails-mode))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue