summaryrefslogtreecommitdiffstats
path: root/.emacs.d/init.org
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init.org')
-rw-r--r--.emacs.d/init.org24
1 files changed, 24 insertions, 0 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index df9b930..c62a1d2 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -398,3 +398,27 @@
(global-set-key (kbd "C-c Q") #'delete-other-windows)
(global-set-key (kbd "C-c R") #'delete-window)
#+END_SRC
+
+* Use ternjs for javascript development
+
+ Ternjs seems like an interesting project. Add its location to the
+ =load-path=, autoload it and after it loads setup the auto-complete
+ functionality.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-to-list 'load-path "/usr/lib/node_modules/tern/emacs/")
+ (autoload 'tern-mode "tern" nil t)
+
+ (stante-after tern
+ (require 'tern-auto-complete)
+ (tern-ac-setup))
+ #+END_SRC
+
+* Turn on tern for javascript
+
+ Torn on tern when working in =js2-mode=. It adds eldoc-like
+ functionality and autocompletion.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'js2-mode-hook #'tern-mode)
+ #+END_SRC