Commit graph

195 commits

Author SHA1 Message Date
Somelauw a8f68c0cca Add escape and M-SPC bindings to ivy
- escape quits the minibuffer
- M-SPC enters transient state

See conventions at
https://github.com/syl20bnr/spacemacs/blob/master/doc/CONVENTIONS.org
2017-04-12 23:21:51 -04:00
Steven Allen 6b7aa70428 Late expand completion backends in the spacemacs|add-company-backends macro
Otherwise, the Haskell layer throws an eager expansion error because
`layers/+lang/haskell/funcs.el`, which calls this macro, is loaded before
`layers/+completion/auto-completion/config.el`, which defines
`spacemacs-default-company-backends`.
2017-04-11 23:51:29 -04:00
duianto 743471996f Update auto-completion layer readme.org: dead link
Problem:  The auto-complete link: auto-complete.org leads to a domain
          for sale page.
Solution: Change the link to the auto-complete github page.
2017-03-26 13:25:59 -04:00
Robert O'Connor e9ff9f09c6 Remove trailing whitespace from all files 2017-03-26 13:06:43 -04:00
syl20bnr 12827c03d8 core: add :hooks property to spacemacs|add-company-backends
Allow to control wether to hook the generated hook functions or not.
2017-03-19 12:40:36 -04:00
bmag b6e553bd06 rg: explicitly request line numbers
rg tries to be smart about printing line numbers in its output (if running
inside a TTY or not). On Windows, sometimes (always?) it chooses not to print
line number. However, we always want line numbers, so we need to pass -n flag.

Also fix a minor grammar mistake.
2017-03-09 09:00:39 +02:00
Aaron Jensen 0c8af9686c Fix ivy wgrep and helm-ag when used with rg
wgrep does not know how to handle column numbers, which the `--vimgrep` flag
adds.
2017-02-20 08:39:42 +02:00
syl20bnr 1cfb90e030 auto-complete: add fuzzy package
Needed for fuzzy completion with auto-complete
2017-02-02 14:56:44 -05:00
syl20bnr 7d75e651a4 Remove limitation of number of candidates for helm-themes
Fixes #4062
2017-02-02 00:08:59 -05:00
syl20bnr 6b6d365b96 Speed up SPC h SPC by moving FAQ source in its own feature
Getting FAQ candidates requires org to be loaded which in turn requires to
load magit (via orgit) etc...

This commit moves the FAQ helm source to a new feature helm-spacemacs-faq and
removes the FAQ source from SPC h SPC so the FAQs are only available as a helm
source via SPC h f.

But we have still the FAQ org file entry in SPC h SPC so it is easy to open
the file from the main help key binding.
2017-01-15 22:19:56 -05:00
syl20bnr c1274fe580 Remove spacemacs-base/helm-spacemacs-deprecated 2017-01-15 22:19:56 -05:00
syl20bnr 3162f0e19b core: factorize code in configuration-layer/make-all-packages 2017-01-15 22:19:56 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
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