85ace24553
The init function should be a post-init instead of an init function. Also simplified the configuratin quite a bit.
31 lines
852 B
EmacsLisp
31 lines
852 B
EmacsLisp
;;; funcs.el --- Javascript Layer functions File for Spacemacs
|
||
;;
|
||
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
||
;;
|
||
;; Author: Muneeb Shaikh <muneeb@reversehack.in>
|
||
;; URL: https://github.com/syl20bnr/spacemacs
|
||
;;
|
||
;; This file is not part of GNU Emacs.
|
||
;;
|
||
;;; License: GPLv3
|
||
|
||
|
||
;; tern
|
||
|
||
(defun spacemacs//set-tern-key-bindings (mode)
|
||
"Set the key bindings for tern and the given MODE."
|
||
(spacemacs/set-leader-keys-for-major-mode mode
|
||
"rrV" 'tern-rename-variable
|
||
"hd" 'tern-get-docs
|
||
"gg" 'tern-find-definition
|
||
"gG" 'tern-find-definition-by-name
|
||
(kbd "C-g") 'tern-pop-find-definition
|
||
"ht" 'tern-get-type))
|
||
|
||
(defun spacemacs//tern-detect ()
|
||
"Detect tern binary and warn if not found."
|
||
(let ((found (executable-find "tern")))
|
||
(unless found
|
||
(spacemacs-buffer/warning "tern binary not found!"))
|
||
found))
|