Permalink
Browse files

Use smartparens in js2-mode

  • Loading branch information...
1 parent f79b44a commit 766a196ace69be053c4372a66eb444ae4a703ac0 @magnars committed Mar 24, 2013
Showing with 6 additions and 0 deletions.
  1. +4 −0 init.el
  2. +2 −0 setup-js2-mode.el
View
@@ -59,6 +59,7 @@
(cons 'move-text melpa)
(cons 'gist melpa)
(cons 'htmlize melpa)
+ (cons 'smartparens melpa)
(cons 'elisp-slime-nav melpa)
;(cons 'elnode marmalade)
(cons 'slime-js marmalade)
@@ -94,6 +95,9 @@
(require 'setup-html-mode)
(require 'setup-paredit)
+;; Default setup of smartparens
+(require 'smartparens-config)
+
;; Language specific setup files
(eval-after-load 'js2-mode '(require 'setup-js2-mode))
(eval-after-load 'ruby-mode '(require 'setup-ruby-mode))
View
@@ -32,6 +32,8 @@
(defadvice js2r-inline-var (after reindent-buffer activate)
(cleanup-buffer))
+(add-hook 'js2-mode-hook (lambda () (smartparens-mode 1)))
+
(defun js2-hide-test-functions ()
(interactive)
(save-excursion

0 comments on commit 766a196

Please sign in to comment.