From b809de14280337dc6cdcf696b66469540cfab325 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 6 May 2015 09:28:04 +0200 Subject: Emacs: Install and configure tern package --- tag-emacs/emacs.d/init.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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-" . 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 -- cgit 1.4.1