Commit graph

90 commits

Author SHA1 Message Date
syl20bnr 014ed73109 ivy: change layer variable name for ivy-rich and add doc 2018-01-10 22:19:04 -05:00
Alejandro Catalina 43b35d5f05 Make ivy-rich a variable that controls whether to install it or not. 2018-01-10 22:10:26 -05:00
Chirantan Ekbote 759a65cb71 Replace counsel--git-dir with (ivy-state-directory ivy-last)
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>
2018-01-06 22:49:03 -05:00
Nikita Leshenko d0089a23de ivy: spacemacs-help: Fix candidate layers with no packages
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.
2018-01-06 22:29:15 -05:00
syl20bnr 70925f3fba ivy: sort packages 2018-01-06 21:44:58 -05:00
Alan Ferguson 3467aa8433 ivy: add ivy-rich display transformer for ivy-switch-buffer 2018-01-06 21:40:53 -05:00
syl20bnr 46c5dfa4a7 cl-loop instead of loop 2018-01-06 21:38:13 -05:00
syl20bnr 14b206492b ivy: use post-init to add hook for org-ctrl-c-ctrl-c 2018-01-06 11:51:19 -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
Ruslan Kamashev a7e30bfcb4 Fix typo (issue #9655) 2017-09-29 12:47:35 +03: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 84751cbc53 counsel: rename git dir variable
counsel--git-grep-dir was renamed upstream to counsel--git-dir.
2017-09-10 19:54:33 +03:00
d12frosted c35b5b3dc3
set ivy-use-selectable-prompt to t
Following #8571.
2017-08-01 16:51:19 +03:00
d12frosted 6f5c50127f
remove duplication of key bindings in ivy readme 2017-07-30 14:52:55 +03:00
d12frosted 3c408b45a4
mention C-M-j key binding for using current input in ivy mini buffer
Fixes #8571
2017-07-29 20:33:41 +03:00
bmag 9e2da0037c Ivy: add counsel-mark-ring 2017-07-09 18:19:38 +03:00
James Wang 804bdb817b counsel-find-file: Bind `find-file-other-window' to "j"
By default, "M-o w" binding has already been used by ivy package. So we bind
`find-file-other-window' to "M-o j" here.
2017-07-07 12:32:21 +02:00
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02: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
Eivind Fonn ebc6ba015e Implement directory search for ivy as well 2017-07-01 12:41:26 +02:00
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
MadAnd 8fea6f134d ivy: Use new API to register additional transient state bindings
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.
2017-05-24 09:12:48 +02: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
Muneeb Shaikh f93730b19c ivy: counsel-faces -> counsel-describe-face
Mistakenly added `counsel-faces` while the intended command that should go under
`SPC h d F` is `counsel-describe-face`.
2017-04-28 22:24:21 -04:00
Adrian Staniec 29605f57eb add perm. highlight and swoop/swiper to Symbol Highlight Transient State 2017-04-23 19:42:32 -04:00
Muneeb Shaikh 52ffc018b1 ivy: Add counsel-faces 2017-04-20 22:43:26 -04:00
ralesi 9b24a38eb9 Ivy: Multiple loading improvements and additional alternates
* 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
2017-04-17 23:39:35 -04:00
duianto 94703a64be Remove "pr" 'projectile-recentf from ivy layer
problem: "pr" 'projectile-recentf is defined in both the Ivy layer
and spacemacs-base/packages.el

solution: remove it from the Ivy layer.
2017-04-17 17:43:05 -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
person808 489f391fb5 Add beginners tutorial to ivy-spacemacs-help. 2017-04-16 11:14:59 -04:00
Somelauw c5066d6100 Add documentation for ivy 2017-04-16 11:14:59 -04:00
Somelauw 4361254e06 Fix #8698 2017-04-13 12:04:30 +02: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
MadAnd 33f3cf1293 ivy: add 2 missing bindings "SPC fel" and "SPC hi"
These are available with Helm and Counsel has similar counterparts.
2017-04-12 23:23:09 -04:00
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
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 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
Aaron Jensen 10c59bb142
ivy: Add C-c C-e to edit counsel-ag search results 2017-01-04 19:26:33 +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
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