Commit graph

173 commits

Author SHA1 Message Date
syl20bnr 1c4f685b13 core: refactor layer system
TL;DR Should get 20~25% speed improvement on startup, should get a big
improvement when using ivy or helm SPC h SPC. Users with layers.el files
in their layers must use `configuration-layer/declare-used-layer`
instead of `configuration-layer/declare-layer`

The implementation of the layer system made heavy use of `object-assoc`
and `object-assoc-list` functions which are not efficient. This PR
mainly replaces those object lists with hash maps in order to index the
objects by their name and achieve an O(1) access time.

The old object lists `configuration-layer--layers` and
`configuration-layer--packages` have been each by two variables each:
- `configuration-layer--indexed-layers` which is a hash-map of all the
layer objects and `configuration-layer--used-layers` which is a list of
all _used_ layers symbols,
- symmetrically `configuration-layer--indexed-packages` which is a
hash-map of all the package objects and
`configuration-layer--used-packages` which is a list of all _used_
packages symbols.

The hash map `configuration-layer--layer-paths` is gone, now we create
directly layer objects when discovering the layers and set the :dir
property. Note that previously the layer paths were the parent directory
of the layer, now :dir is the layer path.

The function `configuration-layer//make-layer` is now similar to its
counterpart `configuration-layer//make-package` in the sense that it
takes an optional `obj` to be able to override its properties.

The functions `configuration-layer/declare-layer` and
`configuration-layer/declare-layers` now takes an optional parameter
`usedp` in order to declare used or not used layers. For convenience
new functions have been added: `configuration-layer/declare-used-layer`
and `configuration-layer/declare-used-layers`, users _must_ update all
occurrences of `configuration-layer/declare-layer` by
`configuration-layer/declare-used-layers` in their `layers.el` files.

`helm-spacemacs-help` and `ivy-spacemacs-help` are updated to match the
changes in `core-configuration-layer.el`.

Rename some variables to make them more explicit:
`configuration-layer-no-layer` -> `configuration-layer-exclude-all-layers`
`configuration-layer-distribution` -> `configuration-layer-force-distribution`
2016-07-28 23:26:54 -04:00
syl20bnr f1247c8d18 core: new variable dotspacemacs-frozen-packages
Packages listed in dotspacemacs-frozen-packages cannot be updated or
rollbacked.
2016-07-09 14:58:30 -04:00
d12frosted 5b9e84ea72 improve font documentation
- make it clear that setting dotspacemacs-default-font has no effect in
  terminal
- make it clear that it's user responsibility to install Source Code Pro
  font
2016-07-05 00:23:16 -04:00
ralesi 1a13cba730 Fix #6429, provide tests for new startup-list. 2016-06-26 14:09:12 -04:00
d12frosted 86c7796fa8 allow to set dotspacemacs-filepath 2016-06-26 14:07:16 -04:00
ralesi 052142ab33 Add list length designstion to startup-list.
* Allow dotspacemacs-startup-list to contain cons cells, specifying list
  length for items.
* Deprecates dotspacemacs-startup-recent-list-size
2016-06-24 18:52:08 -04:00
syl20bnr dc94784e70 Remove leuven theme from spacemas-ui-visual and simplify default value
for dotspacemacs-themes, set only the spacemacs themes.
2016-06-12 21:15:10 -04:00
Albin Ludvig Otterhäll 9e3f75a36f Remove references to Solarized themes
Solarized themes has been removed from the default distribution of
Spacemacs.
2016-06-12 21:12:34 -04:00
syl20bnr f23ecf0b12 Rename +distribution to +distributions 2016-06-08 22:17:04 -04:00
Eivind Fonn 5a444184f1 core: allow list of fonts 2016-06-03 23:41:22 -04:00
syl20bnr b5ec99aa58 Change default value of dotspacemacs-visual-line-move-text to nil 2016-06-02 23:10:35 -04:00
syl20bnr f76136c86d Rename dotfile variable to dotspacemacs-visual-line-move-text 2016-06-02 23:09:18 -04:00
Steven Allen db3e867347 make visual line move configurable 2016-06-02 23:06:03 -04:00
Muneeb Shaikh 371dd85ff2 core: add another code folding method using origami to spacemacs-editing
* layers/+spacemacs/spacemacs-editing/packages.el (spacemacs-editing/init-origami):
  add origami package and initialize it
* core/core-dotspacemacs.el (dotspacemacs-override-evil-folding): new
  variable to allow choosing between different code folding methods.
  Currently supported `evil' and `origami'
2016-05-31 22:46:04 -04:00
syl20bnr 60f5a3a0fa New dotfile variable dotspacemacs-download-packages
This new variable replace dotspacemacs-delete-orphan-packages

It defines the behaviour of Spacemacs when downloading packages.

Possible values are `used', `used-but-keep-unused' and `all'.
- `used' will download only explicitly used packages and remove any
unused packages as well as their dependencies.
- `used-but-keep-unused' will download only the used packages but won't
delete them if they become unused.
- `all' will download all the packages regardless if they are used or
not and packages won't be deleted by Spacemacs.

Default value is `used`.
2016-05-30 22:58:59 -04:00
Eivind Fonn d51987f497 core: remove support for all layers 2016-05-30 21:06:54 -04:00
syl20bnr 1f993bddf6 Rename spacemacs-helm and spacemacs-ivy layers to helm and ivy
For ivy users: be sure to update your dotfile by replacing spacemacs-ivy
by ivy
2016-05-15 22:24:27 -04:00
syl20bnr fed2e3c04f Fix dotspacemacs wizard
THe dotfile was not reloaded after being updated by the wizard.
2016-05-14 12:09:25 -04:00
syl20bnr 738f425276 Add spaceline-compile to spacemacs-post-user-config-hook
Also improve support for GUI client using a server launcher with
emacs --daemon.
2016-05-11 20:07:26 -04:00
Eivind Fonn 5b719df500 Some fixes for visual shift variable
- Rename mode to state (preferred nomenclature in evil)
- Change default value
- Add to dotspacemacs template
- Fix parens
2016-05-06 13:46:41 +02:00
Steven Allen bd4bdd3119 core: make retaining visual mode on shift optional
default to disabled to follow vim's behavior.

fixes #5273
2016-05-06 13:36:46 +02:00
Eivind Fonn ec9f6cfd53 Discover layers before testing dotfile 2016-04-07 23:20:05 -04:00
Fabien Dubosson 57e91fe035 Correct more <SPC> to SPC 2016-04-05 12:52:54 +02:00
syl20bnr cc5afabcae Experimental: defer by 0.1s spaceline
spaceline can sometime take 1s to load when Emacs starts, using
:defer 0.1 seems to smooth the startup a little bit.
2016-04-03 00:38:13 -04:00
syl20bnr ae9f40ae77 core: new variable dotspacemacs-ask-for-lazy-installation 2016-03-27 15:56:15 -04:00
syl20bnr 5e5b7a6569 core: new values for dotspacemacs-enable-lazy-installation
- all
- unused
- nil
- t

Fixed #5608
2016-03-27 15:55:24 -04:00
syl20bnr 16afe67907 core: enhance lazy installation of layer
Now Spacemacs will ask for layer installation when opening a file with
a known file type.
The auto-mode-alist entries are added by the file auto-layer.el in
the layers directory.

Easy insert of forms for lazy initialization can be done with the
interactive function configuration-layer//insert-lazy-install-form.

Change default value of dotspacemacs-enable-lazy-installation to t.
2016-03-25 01:03:37 -04:00
syl20bnr 5585a40db1 doc: update editing style documentation 2016-03-17 20:38:23 -04:00
syl20bnr 2d61e5304e core: add support for :variables keyword in dotspacemacs-editing-style
Add variable `hybrid-mode-enable-hjkl-bindings` to enable hjkl
navigation in hybrid mode.

example:

dotspacemacs-editing-style '(hybrid :variables
                                     hybrid-mode-enable-hjkl-bindings t
                                     hybrid-mode-default-state 'normal)
2016-03-16 22:43:50 -04:00
syl20bnr d52eb414bb Remove dotspacemacs-use-ido
Users should now bind ido commands themselves.
2016-03-10 23:13:19 -05:00
Ista Zahn 2d353a329e Default to using helm for files and buffers. 2016-03-10 23:13:19 -05:00
syl20bnr 359df9e4c3 Minor docstring change for dotspacemacs-large-file-size 2016-03-10 23:13:19 -05:00
ralesi 3f376a431b Prompt to open file literally when opening large files. 2016-03-10 23:13:19 -05:00
Boris 51d56232cd fix typo in dotspacemacs/install 2016-03-05 13:43:31 +02:00
Muneeb Shaikh aebef8bfcd core: fix dotspacemacs-editing-style docstring 2016-03-01 18:56:24 +01:00
Fabien Dubosson 21cab12125 Add smart closing parenthesis 2016-02-14 23:09:13 -05:00
justbur b149f4e13a transient-state: new dotspacemacs variable to hide titles
dotspacemacs-show-transient-state-title
2016-01-31 23:50:10 -05:00
justbur c12f6b85c8 transient-state: Add .spacemacs var to hide color guide 2016-01-31 23:48:19 -05:00
Balaji Sivaraman 2b1ed603dc Change all references of micro-state in codebase to transient-state 2016-01-31 23:04:47 -05:00
tonyday567 36e7e4ef73 Add support for todos and agenda in home buffer 2016-01-31 20:31:09 -05:00
Xue Fuqiao 4958f7fc10 Fix "the point" problems
Point is a proper name when it refers to the current editing location.
Moreover, point designates a place *between* two characters (or before the first
character, or after the last character), rather than a particular character.

References:

* http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
* https://www.gnu.org/software/emacs/manual/html_node/elisp/Point.html#index-point
2016-01-31 21:48:52 +01:00
syl20bnr 45def1ec60 core: Add support for lazy installed layer.
New function configuration-layer/lazy-install to add support for
lazy installation of layers based on auto-mode-alist emacs mechanism.

This is essentially the Prelude feature but translated at the layer
level for Spacemacs.

New dotspacemacs variable to enable this feature:
dotspacemacs-enable-lazy-installation
For now this variable is set to nil by default, it will be put to t when
the feature is stable.

POC with elixir layer.
2016-01-31 00:10:14 -05:00
syl20bnr 33ead6fc42 Deprecation of extensions and <pkg>-excluded-packages variables
As announced in previous releases, see CHANGELOG.next for more info
in the Breaking Changes section.
2016-01-17 22:06:04 -05:00
syl20bnr 3d63dd4392 core: fix red mode-line when an error occurred
Rename function configuration-layer//set-error to
configuration-layer//increment-error-count
2016-01-12 00:08:36 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Eivind Fonn d8833215b0 Make scratch buffer major mode configurable 2016-01-11 01:13:10 -05:00
syl20bnr 6d1df2845f core: remove evil variable aliases and change default to nil
People transitioning from Vim could be surprised if we set these
variable to t by default, so setting them to nil respects better
the POLA principle.

Impacted variables:
dotspacemacs-ex-substitute-global
dotspacemacs-remap-Y-to-y$
2016-01-11 01:13:10 -05:00
Fredrik Bergroth 71aa5f6616 Add dotspacemacs-ex-substitute-global setting
If non-nil, this setting inverts the behavior of the 'g' flag in

    :s/pattern/replacement/g
2016-01-11 01:13:10 -05:00
syl20bnr 53d55d3da6 core: offer completion framwork choice in wizard 2016-01-09 14:19:01 -05:00
syl20bnr 4a51254f05 core: backward compatibility with dotspacemacs-command-key 2016-01-09 02:23:04 -05:00