Commit graph

11 commits

Author SHA1 Message Date
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
MadAnd 62a4a60510 javascript: leverage js-doc Yasnippet integration if available
js-doc provides an alternative function for generating function doc comments
that makes use of Yasnippet to easily jump between the comment sections/tags.

This commit enables use of that function, if Yasnippet package is active.
2017-05-23 12:52:18 +02:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr c725823e73 javascript and react: reformat code and move funcs to funcs.el
Some conventional cleanup.
Note that the function `spacemacs/js2-refactor-set-key-bindings` has been
removed since it is not used anywhere.
2017-01-01 22:45:23 -05:00
Corey Grunewald b67118c8ca
Mark tern command as async. Fixes #7591. 2016-12-18 11:44:32 +02:00
syl20bnr c6a6c41d92 Replace hooks by regular list for jump lists
Hook semantic is to be used with run-hooks API and run all hooks
sequentially, jump list semantic is different since the running
functions are not guaranteed to be executed so we prefer using regular
list API to manage jump-lists.
2016-09-04 12:28:40 -04:00
zilongshanren 7a05260136 fix gtags enhancement 2016-08-23 00:08:25 +08:00
Eivind Fonn 928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
syl20bnr 85ace24553 react: fix tern setup
The init function should be a post-init instead of an init function.
Also simplified the configuratin quite a bit.
2016-06-21 19:04:59 -04:00
syl20bnr fdf74897a3 javascript: remove variable javascript-disable-tern-missing-warning
Just log the warning in the message buffer.
2016-04-07 23:13:25 -04:00
Muneeb Shaikh dc799401f7 javascript: enhance tern binary detection
Fix #4292

If tern binary isn't found, warn the user of missing binary and do not
enable tern package(else it makes emacs unresponsive).
Allow user to disable missing binary warning via configuration layer
variable `javascript-disable-tern-missing-warning`
2016-04-07 23:00:20 -04:00