summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 802ec12..15fe482 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -240,7 +240,7 @@
   :bind (("C-<tab>" . company-complete))
   :init (progn
           (add-hook 'prog-mode-hook #'company-mode)
-          (setq company-backends '((php-extras-company company-elisp company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-ropemacs company-cmake company-capf company-gtags company-dabbrev-code company-etags company-keywords)
+          (setq company-backends '(company-tern (php-extras-company company-elisp company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-ropemacs company-cmake company-capf company-gtags company-dabbrev-code company-etags company-keywords)
                                    company-oddmuse company-files company-dabbrev)
                 company-idle-delay .3
                 company-begin-commands '(self-insert-command)
@@ -1392,6 +1392,16 @@ symbol, not word, as I need this for programming the most."
             (setq js2-basic-offset 4
                   js2-global-externs '("$"))))
 
+(req-package tern
+  :config (progn
+            (setq tern-command (list (executable-find "tern")))
+            (defun ap/enable-tern ()
+              (tern-mode 1))
+            (add-hook 'js2-mode-hook #'ap/enable-tern)))
+
+(req-package tern-company
+  :require (tern company))
+
 (add-to-list 'auto-mode-alist '("composer\\.lock" . js-mode))
 
 (req-package scss-mode