summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-05-06 09:28:04 +0200
committerAlan Pearce2015-05-06 09:28:04 +0200
commitb809de14280337dc6cdcf696b66469540cfab325 (patch)
tree3f99fedc11868ebe95489e17ea7c471ce78b3ae9 /tag-emacs
parente364a183f35cfe88d07b169f5cef08e4fbcfc0fb (diff)
downloaddotfiles-b809de14280337dc6cdcf696b66469540cfab325.tar.lz
dotfiles-b809de14280337dc6cdcf696b66469540cfab325.tar.zst
dotfiles-b809de14280337dc6cdcf696b66469540cfab325.zip
Emacs: Install and configure tern package
Diffstat (limited to 'tag-emacs')
-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