Commit graph

38 commits

Author SHA1 Message Date
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
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
Eivind Fonn 08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
baxx df896e4ee5 Added impatient-mode and updated HTML readme
impatient-mode enables one to view HTML document changes live
via a local server, link to package here:

https://github.com/skeeto/impatient-mode/blob/master/README.md

Seemed as though HTML layer was an appropriate place for this.
2017-06-18 14:33:15 +02:00
jupl 09ce56df3d Use add-node-modules-path to automatically find local executables 2017-06-07 16:49:11 +02:00
Codruț Constantin Gușoi 07c2fccc94 Adds autocomplete for coffeescript 2017-05-24 13:33:57 +02:00
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
syl20bnr 3072e72773 Replace use-package :diminish by spacemacs|hide-lighter 2017-02-13 08:38:37 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -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
Shanavas M 5d8f7bd7c6 Add missing prefices for js2-mode 2016-10-17 20:08:08 +02:00
Eivind Fonn 5a869764dd Further improve gtags layer
- Add option to disable by default
- Use local-vars hook to allow per-project enable/disable
- Don’t enable helm-gtags-mode (no need)
- Move emacs bindings from helm-gtags-mode-map to ggtags-mode-map
2016-08-22 15:11:25 +02:00
Shanavas M 83e5d41042 Add "documentation" prefix for js-doc menu 2016-08-17 20:01:43 +02:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +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
Eivind Fonn 62fc64f745 core: special toggle API for minor modes 2016-05-31 22:33:44 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
sooheon 15e6290151 Make check for company-mode explicit, not implicit
People may have company-mode installed without necessarily using the
auto-completion layer.
2016-05-27 00:32:05 -04:00
Christoph Paulik 4d080a65fb Diminish tern and skewer mode. 2016-05-11 20:47:04 -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
syl20bnr 173e2a5421 Move all prefix names from config.el to init functions 2016-04-03 00:12:28 -04:00
syl20bnr 82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Eivind Fonn 4ed7ebe49d Update previous comment 2016-02-27 14:56:42 +01:00
Andrew Cates b6a27e931b fix typo for js2-imenu extras mode 2016-02-27 14:56:21 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Eivind Fonn e29ac21345 Register all REPLs and make SPC m ' bindings 2016-01-31 23:39:25 -05:00
Eivind Fonn e9f8377b92 Tweak flycheck loading process 2016-01-31 23:04:48 -05:00
syl20bnr ba403b2df1 javascript: improve REPL
- add send region
- add send and focus functions
- add toggle for livid-mode
- lazy start the http server
2016-01-21 11:52:47 -05:00
Daniel Luna c035bca52c Added JS repl via skewer-mode and livid-mode. 2016-01-21 11:52:47 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Michael Hauser-Raspe f3f6988f0a remove tern port files 2016-01-08 20:59:08 +01:00
Eivind Fonn ac0ba50154 Make flycheck/flyspell hooks more explicit 2015-12-11 02:08:55 -05:00
Brenton Alker 94ae7b1b40 javascript: Declare prefix for "text" "move" menu 2015-11-27 10:32:51 +01:00
justbur 9befd20a1a layers: Transition to new key bindings functions
Removes dependence on evil-leader centralizing control over the method
of key binding in core-keybindings.el
2015-11-21 18:22:51 +01:00
Robert O'Connor a9716e3f79 add evil-matchit support for js files 2015-10-13 23:48:44 -04:00
Eivind Fonn 56ecd43753 Add variables to opt-in to flycheck/flyspell 2015-10-10 23:18:46 -04:00
justbur 6eab954afe Use + instead of ! for layer categories
Helm seems to treat "!" specially in pattern matching, so having a ! in
the pattern string when traversing directories is problematic. This
change fixes #2737, because as far as I can tell "+" has no special
meaning in a helm pattern.

Of course, we can choose a different character, but I'm fond of "+" as
representing "more layers here".
2015-09-11 00:13:51 -04:00
Renamed from layers/!lang/javascript/packages.el (Browse further)