Commit graph

84 commits

Author SHA1 Message Date
Miciah c4541bb1b5 helm: Fix error from SPC s f on non-file buffers
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.
2018-07-12 09:28:13 +03:00
Kalle Lindqvist 378fa687a1 Move helm variable from helm layer to spacemacs-completion layer 2018-06-16 00:02:59 -04:00
syl20bnr e24be2186a Truly lazy load helm based on key bindings
We will need to also support Emacs editing style.
2018-06-14 02:05:01 -04:00
Ben Leggett 1884863864 Fix breakage of M-x caused by a417e3ca85 2018-06-12 13:53:23 -04:00
syl20bnr 65018ea6c7 Hide Helm lighter in mode-line 2018-06-11 04:04:25 -04:00
syl20bnr 6a51d557da Also defer helm loading on idle 2018-06-11 01:34:08 -04:00
syl20bnr a417e3ca85 Lazy load helm 2018-06-11 01:34:02 -04:00
syl20bnr b282e553ba Use dotspacemacs backward compatibility macro instead of aliases 2018-06-08 02:24:38 -04:00
syl20bnr 9a3a1384ca helm: move functions to funcs.el 2018-05-21 01:18:37 -04:00
syl20bnr 5d830fca43 dump: require some helm packages while dumping 2018-05-20 03:58:48 -04:00
syl20bnr e5d8603290 Fix symbols's function definition is void: winum--window-list
fixes #10446
2018-05-18 01:25:29 -04:00
CeleritasCelery 2609538855 fix helm layer broken with smex package 2018-05-18 01:02:58 +03:00
duianto f4a3025174 Format symbol highlight transient state
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.
2018-05-16 00:41:37 +03:00
Bet4 b0f77612e3 Call helm-mode when helm is initialized
Fixes #9826
2018-03-03 23:55:01 -05:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
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.
2018-03-03 23:40:10 -05:00
Cormac Cannon 9cb48f2403 Added :commands section to export helm-xref-show-xrefs
Fixes a missing symbol error on my system.
2018-02-27 23:32:52 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr 13961e8ea1 helm: change default rg max-columns value to 512 and add doc 2018-02-24 19:49:39 -05:00
mike-work 658c34b9cc Configure rg max column number for search. 2018-02-24 19:49:39 -05:00
syl20bnr 2a5670e8df lsp: move helm-xref and ivy-xref ownership to helm and ivy layers 2018-02-18 22:48:12 -05:00
Jack Kamm da64ca5a0b fix autoloading for spacemacs/helm-find-files #9826 2018-01-17 23:26:09 -05:00
syl20bnr 41e546f040 Move all use-package hook declaration to pre-init functions
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.
2018-01-10 23:57:18 -05:00
syl20bnr 0ccc0067c7 helm: minor formating edit 2018-01-09 23:19:57 -05:00
Nir Friedman 4e7147375d Add better helm default multi action for files/buffers 2018-01-09 23:09:21 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
smile13241324 a9e57f6c83 Fix documentation for sphinx, confluence, helm and ivy layer 2017-12-16 14:20:41 +02:00
syl20bnr 41e91a9dcf core: move all dotspacemacs-helm-* variables to layer variables
Add support for backward compatibility via a macro instrad of defvaralias as the
latter was not sufficient to support all the use-cases.
2017-10-08 10:29:34 -04:00
syl20bnr 3bce69aba1 Fix warnings about unrecognized keys without helm or ivy layers
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.
2017-09-26 00:10:00 -04:00
syl20bnr dc58801c7d core: refactor shadow mechanism
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
     )
2017-09-25 23:07:22 -04:00
syl20bnr 95699ee61c core: add layer shadowing system
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.
2017-09-21 23:56:09 -04:00
bmag f221d7ed73 helm-bookmarks: don't change keys to early
helm-bookmark-map might not be available yet when helm-mode is enabled, so don't
change bindings until it is available. (fixes a void-variable error)
2017-09-07 13:49:55 +03:00
JAremko 06301b2212 Improve exporting/testing 2017-08-18 20:50:21 +03:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Tim Jäger 0b2dfd0297 Implement helm-dir-search
This is equivalent to helm-file-search with the current directory as the scope
2017-07-01 12:41:03 +02:00
Paulo Schneider 92b0f47c20 Fix docstring for searching in files with Helm
Although the functions search in files, the description references opened
buffers.

Addresses issue #9025.
2017-06-12 12:22:56 +02:00
David Florness 81dd44ef72 Fix typo 2017-06-04 21:39:56 -05:00
Eivind Fonn 909d23f412 Use symbols instead of strings 2017-05-23 16:04:40 +02:00
MadAnd 5eeaed75d9 transient-state: Improve handling of additional bindings
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.
2017-05-23 16:03:03 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
Aaron Jensen c4ce10ad82 helm/ivy: Limit rg results to 150 columns
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.
2017-05-07 22:07:42 -04:00
Adrian Staniec 29605f57eb add perm. highlight and swoop/swiper to Symbol Highlight Transient State 2017-04-23 19:42:32 -04:00
Kristoffer Haugsbakk a9a8f1e905 docs: correct keybinding for helm-resume
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`).
2017-04-20 23:13:37 -04:00
syl20bnr 7554affd49 Remove additional CUSTOM_IDs from docs 2017-04-17 19:36:38 -04:00
syl20bnr 62167f708d tests: move html-export test to doc /tests/doc directory 2017-04-17 19:25:43 -04:00
syl20bnr a4be86cb5d Update documentation to remove explicit mentions to helm
Move some helm explicit sections the helm layer README.
2017-04-16 11:14:59 -04:00
John Wood 86829c5467 Add Helm layer README
Add a README.org to the Helm layer to fix `helm-spacemacs-help-layers`
(`SPC h l`). There is little actual documentation -- it just links to
the official docs as well as the Helm wiki and the Helm guide.

Issue #8679
2017-04-16 11:14:59 -04:00
syl20bnr 2fba8eeba8 Remove unecessary parenthesis in comments 2017-04-12 23:35:23 -04:00
tinysong 41de690a55 fix url jump error 2017-04-12 23:34:00 -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