From 8bb5cd2c624bb11993b2196f5267aa9acaa7fb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Schwanck?= Date: Sat, 16 May 2020 18:13:44 -0300 Subject: [PATCH 1/3] fix rails server lag --- modules/lang/ruby/README.org | 13 ++++++++++++- modules/lang/ruby/config.el | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/lang/ruby/README.org b/modules/lang/ruby/README.org index cc307c783..d0068c804 100644 --- a/modules/lang/ruby/README.org +++ b/modules/lang/ruby/README.org @@ -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. diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 01ae63abb..15ee726f2 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -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)) From 4cb7f48e03ae2d77534df63053e810b01fb6899f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Schwanck?= Date: Sun, 17 May 2020 02:18:01 -0300 Subject: [PATCH 2/3] move description to hack --- modules/lang/ruby/README.org | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/lang/ruby/README.org b/modules/lang/ruby/README.org index d0068c804..835b5035e 100644 --- a/modules/lang/ruby/README.org +++ b/modules/lang/ruby/README.org @@ -13,7 +13,7 @@ - [[#windows][Windows]] - [[#appendix][Appendix]] - [[#commands][Commands]] - - [[#rails-server][Rails Server]] + - [[#hacks][Hacks]] * Description This module add Ruby and optional Ruby on Rails support to Emacs. @@ -91,12 +91,8 @@ The rspec-mode prefix is =SPC m t=. Here is some examples: | ~rspec-verify~ | =SPC m t v= | Runs rspec on current file | | ~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. +** Hacks ++ =projectile-rails-custom-server-command= were changed to suppress extraneous output logged + to console. This was done to prevent a memory leak where the underlying + process would continue logging to an Emacs buffer, which would grow forever. You can change to default behaviour by + setting this variable to =nil=. From 771d062e677d743d62df1bfe5d3ad39e6f64034f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Schwanck?= Date: Sun, 17 May 2020 02:20:53 -0300 Subject: [PATCH 3/3] hack to description --- modules/lang/ruby/README.org | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/lang/ruby/README.org b/modules/lang/ruby/README.org index 835b5035e..cd64f92ea 100644 --- a/modules/lang/ruby/README.org +++ b/modules/lang/ruby/README.org @@ -7,13 +7,13 @@ - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#packages][Packages]] + - [[#hacks][Hacks]] - [[#prerequisites][Prerequisites]] - [[#ubuntu][Ubuntu]] - [[#macos][MacOS]] - [[#windows][Windows]] - [[#appendix][Appendix]] - [[#commands][Commands]] - - [[#hacks][Hacks]] * Description This module add Ruby and optional Ruby on Rails support to Emacs. @@ -48,6 +48,12 @@ This module add Ruby and optional Ruby on Rails support to Emacs. + [[https://github.com/eschulte/jump.el/tree/e4f1372cf22e811faca52fc86bdd5d817498a4d8][inflections]] + [[https://github.com/plexus/chruby.el][chruby]] (=+chruby=) +** Hacks ++ =projectile-rails-custom-server-command= were changed to suppress extraneous output logged + to console. This was done to prevent a memory leak where the underlying + process would continue logging to an Emacs buffer, which would grow forever. You can change to default behaviour by + setting this variable to =nil=. + * Prerequisites Many of this modules plugins require ruby with some version manager (RVM or Rbenv) and the rubocop gem. @@ -91,8 +97,3 @@ The rspec-mode prefix is =SPC m t=. Here is some examples: | ~rspec-verify~ | =SPC m t v= | Runs rspec on current file | | ~rspec-verify-method~ | =SPC m t s= | Runs rspec for the item on cursor | -** Hacks -+ =projectile-rails-custom-server-command= were changed to suppress extraneous output logged - to console. This was done to prevent a memory leak where the underlying - process would continue logging to an Emacs buffer, which would grow forever. You can change to default behaviour by - setting this variable to =nil=.