spacemacs/layers/+completion/ivy
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
..
local/ivy-spacemacs-help Add beginners tutorial to ivy-spacemacs-help. 2017-04-16 11:14:59 -04:00
config.el helm/ivy: Limit rg results to 150 columns 2017-05-07 22:07:42 -04:00
funcs.el Bump year in copyright headers 2017-01-05 23:08:17 -05:00
layers.el Bump year in copyright headers 2017-01-05 23:08:17 -05:00
packages.el core: implement :depends for package declarations 2017-06-22 11:53:05 +02:00
README.org update docs to the new toc-org format 2017-05-22 18:35:37 +03:00

Ivy layer

Description

This layer enables Ivy for completion. It will replace the default completion by Helm.

These completion systems are the central control towers of Spacemacs, they are used to manage buffers, projects, search results, configuration layers, toggles and more…

Mastering your choice of completion system will make you a Spacemacs power user.

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add ivy to the existing dotspacemacs-configuration-layers list in this file.

Configuration

You can customize ivy with the following variables:

  • ivy-wrap Whether C-n and C-p should wrap-around when at the the first or last candidate. The default value is nil.
  • ivy-extra-directories Setting this to nil hides . and .. directories from file name completion. You can still go up a directory up by DEL. The default value is ("../", "./").
  • ivy-use-virtual-buffers Add bookmarks and recent files to buffer completion menu. The Spacemacs default is t.
  • ivy-height The height of the minibuffer. The Spacemacs default is 15.

Key Bindings

If you choose ivy as completion system, make sure to read the official manual. In case you don't want to read everything, at least familiarise with minibuffer key bindings.

Some useful key bindings are presented in the following table.

Key Binding Description
RET call default action on current candidate
M-RET the same as RET but doesn't close completion minibuffer
C-M-j use current input immediately (this can be used to create a new file in Find File)
tab complete partially
M-o show the list of valid actions on current candidate (then press any of described keys to execute it)
C-M-o the same as M-o but doesn't close completion minibuffer
C-' use avy to quickly select completion on current page (sometimes faster than using arrows)
<ESC> close minibuffer

Transient state

Press M-SPC anytime in Ivy to get into the transient state.

Key Binding Description
j select next candidate
k select previous candidate
d call default action on candidate
g the same as d but doesn't close completion minibuffer
o leave transient state