This reverts commit 3a23e0cc6b.
This change completely break `SPC f F` in two ways:
1) it breaks the convention followed at various places to have capital letter
bindings to prefill the helm prompt
2) it breaks the main functionality of the bindings which is very important:
press `SPC f F` on a path will brings you directly to the directory of this
file. It allows to quickly nagivate to files references in files.
I realize this may be controversial, but as I understand it (correct me if I'm
wrong), all `SPC f F` does differently compared to `SPC f f` is call the vanilla
version of `helm-find-files` that does take `thing-at-point` into account. But I
presume we removed this feature in `spacemacs/helm-find-files` for a reason.
Also, it makes sense as a *forte* version of `helm-find-files` when you can't
find something in your current directory and decide to drill deeper. This
complies with the general tone of uppercase/lowercase bindings in Spacemacs, and
provides more utility than te subtle distinction between different
implementations of `helm-find-files`.
Fixes helm not being loaded before calls to:
read-file-name and completing-read.
These are some commands that call either of those two functions:
spacemacs/rename-current-buffer-file (SPC f R)
In a Treemacs window:
treemacs-add-project-to-workspace (C-c C-p a)
In a Magit buffer:
magit-checkout (b b)
Thanks Miciah for a more elegant solution.
This commit also reverts:
Fix helm loading for layouts transient state #11705
because it's not needed anymore.
And the previously commented out transient hook minibuffer-setup-hook (it
doesn't seem to ever have been used) is removed because:
- It loads helm after a command is called that uses helm (instead of before)
- (spacemacs|hide-lighter helm-mode) has previously been moved to the
helm/init-helm :config section.
Helm has removed the helm-wikipedia-suggest command, so delete Spacemacs's
key binding for the command.
4ef8299d78
* CHANGELOG.develop: Add entry.
* doc/DOCUMENTATION.org: Delete documentation for the key binding for
helm-wikipedia-suggest.
* layers/+completion/helm/packages.el (helm/init-helm): Delete the key
binding for helm-wikipedia-suggest.
Invoking C-x C-f (spacemacs/helm-find-files) right after startup, before helm is
loaded, caused a void function error for helm-current-directory. This fixes it.
Fix issue #6416: SPC s f (spacemacs/helm-files-smart-do-search) in a buffer
that is not visiting a file causes an error:
Wrong type argument: stringp, nil
* layers/+completion/helm/funcs.el
(spacemacs//helm-do-grep-region-or-symbol): Check whether preselection is
nil in order to avoid calling helm-basename on a nil value.
Reduce the width of the listed key bindings by:
Moving the range and highlighted symbols counter to the right of the transient
state title.
Shorten some key description names.
Reduce three instances of "search" to just one.
And reorder the listed keys based on their search scope, small to large:
swoop, buffers, files, project.
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
Had to create dummy init functions at some places since the owner of a package
is the last layer that defines the init function of a package. And a package
can be installed only if it has an owner.
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.