summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org16
1 files changed, 13 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 1bbfa68..38d572b 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -2020,9 +2020,7 @@ And add ensime, an IDE-style environment.
 *** js2-mode
 
 This mode is really great for editing Javascript.  It turns code into
-an AST internally, so it can work with it almost like a lisp.  I don’t
-think there’s anything as good as paredit/redshank for refactoring in
-it though
+an AST internally, so it can work with it almost like a lisp.
 
 #+BEGIN_SRC emacs-lisp
 (use-package js2-mode
@@ -2049,6 +2047,18 @@ it though
                   js2-highlight-level 1)))
 #+END_SRC
 
+**** js2-refactor
+
+Thanks to the AST provided by js2-mode, refactoring is possible.  This
+library implements some refactorings.
+
+#+BEGIN_SRC emacs-lisp
+(use-package js2-refactor
+  :config (progn
+            (add-hook 'js2-mode-hook #'js2-refactor-mode)
+            (js2r-add-keybindings-with-prefix "C-c C-m")))
+#+END_SRC
+
 **** jade (not pug)
 
 Javascript with an inferior node.js process and a debugger?  Awesome.