From: James Bunton Date: Fri, 28 Apr 2017 14:52:40 +0000 (+1000) Subject: ternjs X-Git-Url: https://code.delx.au/dotemacs/commitdiff_plain/ae58291c54f157bd5c8aff6aa44f0bc241764430 ternjs --- diff --git a/README_KEYBINDINGS.md b/README_KEYBINDINGS.md index 67872af..91a7cdb 100644 --- a/README_KEYBINDINGS.md +++ b/README_KEYBINDINGS.md @@ -279,6 +279,15 @@ C-c C-c Compile and load the top-level f C-c M-k Compile (but not load) the current buffer's file ``` + +# Javascript +``` +C-c C-r Rename variable +C-c C-c Find type +C-c C-d Find docs +``` + + # Shell ``` M-! Execute command diff --git a/lisp/my-file-modes.el b/lisp/my-file-modes.el index 6f1dd34..b3832f1 100644 --- a/lisp/my-file-modes.el +++ b/lisp/my-file-modes.el @@ -34,6 +34,8 @@ (setq js2-mode-show-parse-errors nil) (setq js2-mode-show-strict-warnings nil) (setq js--declaration-keyword-re "x^") ; declarations should have normal indentation +(when (require 'tern nil 'noerror) + (add-hook 'js2-mode-hook (lambda () (tern-mode t)))) (require 'markdown-mode) (define-key markdown-mode-map (kbd "M-{") 'markdown-beginning-of-block) diff --git a/packages/tern b/packages/tern new file mode 120000 index 0000000..870434d --- /dev/null +++ b/packages/tern @@ -0,0 +1 @@ +/home/jbunton/.node/lib/node_modules/tern/emacs \ No newline at end of file