Commit graph

182 commits

Author SHA1 Message Date
d12frosted a1fcb13803
fix spacemacs|add-company-backends usage example 2017-01-05 08:59:27 +02:00
Nikolai Myllymäki 1899666592
Show correct headline for beginners tutorial in SPC h SPC 2017-01-04 20:26:48 +02:00
Aaron Jensen 10c59bb142
ivy: Add C-c C-e to edit counsel-ag search results 2017-01-04 19:26:33 +02: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
Nir Friedman bca0e4b6f6
Use helm ag file with interactive input 2016-12-22 17:47:58 +02:00
d12frosted 3e60792136
ivy delete file with confirmation 2016-12-22 15:53:28 +02:00
ralesi 1c8cb4a58c
Delete alternate actions is too invasive 2016-12-22 15:52:57 +02:00
Kristoffer Haugsbakk 3a61f8e6de Add verbatim markup to paths
By convention, filepaths are marked up with `=`.  Also add this markup to the
string `ViewLogMode`.
2016-11-25 12:23:39 +02:00
Aron Griffis 385c12743a Add ripgrep support
* Add rg to helm completion layer
* Add rg to ivy layer
* Prepend rg to dotspacemacs-search-tools
* Add rg to documentation
2016-11-11 15:22:03 +02:00
Bryan Gilbert 7581662d7e rebind 'SPC f b' to 'counsel-bookmark' when using ivy 2016-11-05 12:27:56 +02:00
Eivind Fonn 977a29316b Fix unbound holy-mode error 2016-10-29 15:11:36 +02:00
Xiao Hanyu 0de0705e88 Typo fix
Just a typo fix for auto-completion layer.
2016-10-27 11:06:19 +08:00
Bryan Gilbert b515253026 move helm specific layout transient state keybindings to helm layer 2016-10-23 19:44:35 +02:00
Bryan Gilbert 389d722996 close layout transient state upon entering layout buffer select when 2016-10-23 19:44:35 +02:00
Diego Berrocal 704e103394 Add open packages.el shortcut in spacemacs-help
I find myself wanting to open the package.el and f3 is just too far away
in my keyboard. And I thought maybe this would be something people might
want. Also maybe we could have special binding for actions? like `C-1`
`C-2`, etc
2016-10-17 14:03:21 +02:00
bmag 0e1491c434 Make ivy restrict buffers to layout
Also create separate non-restricted-buffer-list (`SPC B b`) for helm and
ivy.
2016-10-17 13:45:43 +02:00
Bryan Gilbert 59897e2abd Fixed layout transient state not closing on layer select in ivy layer 2016-10-17 13:14:04 +02:00
syl20bnr 703f78c2b8 Cleanup pass on file spacemacs-base/funcs.el
- Apply `/` and `//` rules (double / is for private functions)
- Add missing `spacemacs/` prefixes
- Move functions used outside of spacemacs-base layer to
  core/core-funcs.el
- Remove unused functions

Commit originally intented to only rename linum-update-window-scale-fix
to spacemacs/linum-update-window-scale-fix :-)
2016-10-09 13:14:41 -04:00
Adam Sokolnicki 51c49531e3
Re-map "pp" to counsel-projectile-switch-project
Move counsel-projectile to "p SPC" as the original package suggests.
2016-09-23 10:47:13 +03:00
Eivind Fonn d5baec4b44 Fix SPC sj binding 2016-09-07 14:50:31 +02:00
syl20bnr 03f9f9f700 core: contain side effects when loading packages for SPC h SPC
Fixes some edge cases like SPC f e R performed after SPC h SPC which
could wrongly install or uninstall packages.

Side effects is contained using the variable
configuration-layer--package-properties-read-onlyp, if non nil then
properties value of a package cannot be overwritten.
2016-09-05 20:54:07 -04:00
MadAnd a7232d53e7 Fix auto complete with key sequence in Hybrid mode
Implement handling of `evil-hybrid-state-map` keymap to make completion
with a key sequence work in Hybird state.
2016-08-30 16:18:13 +02:00
bmag 6d454a2313 auto-completion: manual help tooltip and minor fix
New value `manual` for auto-completion-enable-help-tooltip enables the
user to display help tooltip on-demand. Other values remain the same:
nil for no tooltip at all, t (or any non-nil non-manual value) for
automatic tooltip.

Minor fix: call `company-quickhelp-mode` just once, because it's a
global minor-mode.
2016-08-30 16:10:27 +02:00
Eivind Fonn 886aac6386 Fix C-k not working in company-quickhelp-mode 2016-08-30 16:00:19 +02:00
Eivind Fonn 3357153e36 Fix company-quickhelp in daemon mode 2016-08-30 16:00:07 +02:00
YeJun Su 87bddc0dac Replace "ivy-recentf" with "counsel-recentf"
As the tip says: ‘ivy-recentf’ is an obsolete command (as of 0.8.0); use ‘counsel-recentf’ instead.
2016-08-30 15:04:47 +08:00
d12frosted ca8d717f6d
fix typo in auto-completion layer readme 2016-08-27 13:08:32 +03:00
syl20bnr e4b15b16de Dispatch function spacemacs/jump-in-buffer to layers
Use imenu init and post-init functions to leverage the layer system and
get better isolation of configuration.
2016-08-25 20:42:01 -04:00
MadAnd 309e6eb4bb Fix smartparens after nested snippet expansions
Current implementation, #1644, doesn't handle the nested snippet
expansion properly, so you end up with smarparens disabled. Very
annoying.

I improved the implementation to remember the current state of
smartaperns before a top-level snippet expansion and preserve on any
nested snippet expansions.

Also, some housekeeping of the related code:
* Move hook handlers to the `funcs.el`.
* Add comments about yasnippet hooks subtleties relevant to the issue.

Fixes #1512
2016-08-08 13:42:45 +02:00
Eivind Fonn 989dd3d774 Rename variable w/ spacemacs prefix 2016-08-05 21:26:26 +02:00
bmag cea0819ca4 Move helm-popwin config to helm layer 2016-08-05 21:24:47 +02:00
Jeremy Bi 4b682ce1b3 Reduce yas loading warning 2016-08-05 08:47:36 +08:00
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
Ista Zahn 84580b1d80 User configurable default company-backends 2016-07-26 16:33:42 +09:00
bmag 2f6bf80275 Fix void-function spacemacs//restore-previous-display-config error
Move usage of spacemacs//restore-previous-display-config from helm layer
to spacemacs-completion layer. (It's already defined there)
2016-07-25 12:33:40 +09:00
d12frosted 5c5ca4e7a3
add open config action to layer spacemacs help 2016-07-17 09:57:13 +03:00
d12frosted c64d04f944
fix ivy-spacemacs-help//layer-action-add-layer 2016-07-16 11:37:09 +03:00
d12frosted 28220ef979
fix ivy layer help actions 2016-07-16 11:28:59 +03:00
Muneeb Shaikh 5ae1013854 ivy: remove extra projectile-switch-project binding 2016-07-14 20:37:05 +05:30
Muneeb Shaikh 212944ac2b
ivy: fix open spacemacs doc function
fix #6513
2016-07-08 09:04:24 +03:00
liuxiang 43c760df88 Bind "C-c C-e" to spacemacs/helm-find-files-edit for helm-files buffer. 2016-07-05 00:23:16 -04:00
zilongshanren 94969fd81d fix break API changes for ivy 0.8
fix describe packages

refine

rename car cdr to cadr

fix SPC h l
2016-07-05 00:23:16 -04:00
Eivind Fonn 4aa01559af helm: Set projectile-completion-system 2016-07-05 00:23:16 -04:00
Muneeb Shaikh db162af3d8 Set projectile-completion-system to helm
It is inconsistent when using helm as default completion and command
such as `SPC m r f c` opens up ido in rails project.
2016-07-05 00:23:16 -04:00
Exaos-memes 904f7ea665 Define new variable: spacemacs-start-directory.
With this new variable, user can load spacemacs anywhere, e.g.
"~/.emacs.d/spacemacs/". Only user's cache directory is still hard-coded
as "~/.emacs.d/.cache/". If user want to use spacemacs this way, drop
one line as the below in "~/.emacs.d/init.el":

    (setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
    (load-file (concat spacemacs-start-directory "init.el"))
2016-06-23 00:19:34 -04:00
ralesi 560f86f997
Fix :owner reference in ivy-spacemacs-help 2016-06-22 07:44:15 +03:00
Eivind Fonn 92b48eadea 💣 Drop support for Emacs 24.3
Spacemacs now needs at least 24.4 to launch.
2016-06-20 22:05:56 -04:00
syl20bnr 117dcba0ed Revert "Drop support for Emacs 24.3"
This reverts commit 31bab70397 making
a new commit to put TheBB as the author.
2016-06-20 22:05:12 -04:00
syl20bnr 31bab70397 💣 Drop support for Emacs 24.3
Spacemacs now needs at least 24.4 to launch.
2016-06-20 21:55:36 -04:00
Eivind Fonn 2a6ffc72d9 ivy: Support GNE
Implement a keymap for Spacemacs’ counsel search that supports saving
the results to a buffer (bound on F3 as in helm). Ensure that the new
buffer supports the GNE API.
2016-06-18 19:21:26 -04:00