abo-abo/swiper@4f57b5a9 removed the counsel--git-dir variable. Code
that used that variable is now expected to use (ivy-state-directory
ivy-last) instead. Update the code to reflect this change.
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
When a layer doesn't have a package, its name was added to the candidate list as
a symbol instead of a string, breaking actions such as
layer-action-open-packages which expect a string.
In perspective transient state. b and l keys in the docstring have no
corresponding functions declared whenever both helm and ivy layers are not
used.
Add two private variables to fix the issue:
- spacemacs--persp-display-buffers-func
- spacemacs--persp-display-perspectives-func
These variables are set to the correct functions by the helm and ivy layers via
a use-package hook.
Default is `ignore` function so b and l does nothing if both helm and ivy layers
are not used, TODO: we should find a better default function.
Shadowing is now control by layer property ':can-shadow' only.
can-shadow is a commutative relation, if layer1 can shadow layer2 then layer2
can shadow layer1.
the shadow operator is a binary operator accepting two layer names, it is not
commutative and the order of the operands is determined by the order of the
layers in the dotfile (like the ownership stealing mechanism).
If ':can-shadow' is set explicity to nil in the dotfile then the layer won't
shadow any layer.
For instance to install both ivy and helm layer:
(setq dotspacemacs-configuration-layers
'(
ivy
(helm :can-shadow nil)
)
note that due to the commutative relation the above example can also be
written (in this case, ':can-shadow' should be read ':can-be-shawdowed'):
(setq dotspacemacs-configuration-layers
'(
(ivy :can-shadow nil)
helm
)
Layers can now declare in their layers.el file that they shadow one or more
layers using the following functions:
- configuration-layer/shadow-layers
- configuration-layer/shadow-layer
Those function are commutative so:
(configuration-layer/shadow-layer 'layer1 'layer2)
is the same as
(configuration-layer/shadow-layer 'layer2 'layer1)
and means that
layer1 shadows layer2
and
layer2 shadows layer1
The typical use-case is helm and ivy layers. Helm shadows the ivy layer and
Ivy shadows the helm layer.
Shadowing is sensitive to the order of declaration of layers in the dotfile,
for instance:
(setq dotspacemacs-configuration-layers '(
helm
ivy
))
means that ivy shadows helm so helm layer is effectively ignored,
whereas
(setq dotspacemacs-configuration-layers '(
ivy
helm
))
means that helm shadows ivy so ivy layer is effectively ignored.
This mechanism can be turned off using the :can-shadow keyword:
(setq dotspacemacs-configuration-layers '(
ivy
(helm :can-shadow nil)
))
means that both ivy and helm layers will be installed (not recommended in this
case)
Note that the `:can-shadow` mechanism will be fully implemented in a next
commit.
dotspacemacs-directory-snippets-dir contains a path to a directory with yas
snippets in ~/.spacemacs.d (or arbitrary picked dotspacemacs direcotry).
However, while it's not always present (user has to create it manually)
it is always checked while yas is loaded which generates errors.
This diffs forces checking whether the assumed path exists before adding
it to the yas-snippet-dirs.
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.
By convention, code markup (`~`) is reserved for keybindings in Org-based
documentation in Spacemacs. Verbatim markup (`=`) is reserved for code and
other code-like things. So change several readmes to reflect this convention.
Use verbatim markup for things like (non-exhaustive list):
- Emacs Lisp functions, modes, buffers, etc.
- Environment variables
- Directory paths
- Code in general
This is a follow-up commit after #8155 has been merged. It applies the same
changes to code of the `ivy` layer. It is not part of #8155 because there was
no `ivy` layer when that PR was submitted.
Add two new functions: `spacemacs/transient-state-register-add-bindings`
and `spacemacs/transient-state-register-remove-bindings` to prevent layer
authors and end users from dealing with the underlying variables' subtleties.
Emacs doesn't handle long line lengths very well. If you accidentally rg a file
a file that has very long line lengths it can freeze emacs. This prevents rg
from returning any results with more than 150 characters. Instead, it will
indicate that there were results in that file but they were elided.
The keybinding has changed from `SPC h l` to `SPC r l`; see the changelog, entry
0.200.0 (2016/10/02). So correct the documentation to reflect that.
`SPC h l` is currently bound to `helm-spacemacs-help-layers` (on branch
`develop`).
It is an Emacs-wide convention to use `RET` when referring to the act of
pressing the return key. Spacemacs seems to follow that convention as well. So
fix some Org files that were deviating from this convention.
In particular, replace usages of `<return>` and `return` with `RET`.
Also update the description of an `M-RET` keybinding[1] based on the docstring
of `ido-select-text`.
[1]: Suggested-by: bmag <bmag@users.noreply.github.com>
* Don't list imenu if it isn't loaded
* Add recentf config to :post-init function
* Add :init and :config sections for counsel and ivy for accessibility
* Add projectile alt actions to invalidate cache
* Add recentf alt actions to refresh and delete items
* Load flx since it is listed