Commit graph

48 commits

Author SHA1 Message Date
Itai Y. Efrat
09add70efd feat(vertico): add embark-collect-snapshot binding
The C-c C-s binding mirrors the export and writable export bindings.

embark-export is used for type specific exports (such as buffers to an
ibuffer buffer), not for verbatim exports. This is most noticeable if
you want to export a variable list, which gets you to an apropos buffer.
if you just want a list of things to keep around,
embark-collect-snapshot is the tool for the job, but having it be only
on C-; S makes it harder to reach and less visible. C-c C-s is a nice
visible thing to have around.
2022-01-13 23:16:03 +02:00
Itai Y. Efrat
4f34635e04 refactor!(vertico): crm keybindings behaviour
BREAKING CHANGE: This commit changes the behaviour of the TAB and RET
keys in a consult-completing read multiple session, in order to make
them more intuitive. The behaviour is now:

- TAB: (unchanged) always select or deselect the current candidate, and
  if the candidate is selected, move the index to the next one (this
  allows for pressing TAB repeatedly to select multiple subsequent
  candidates).

- RET: If no candidates have been selected, select the current candidate
  and exit the completion session. If some have been selected, disregard
  the current candidate and exit.

- S-TAB: (new) like TAB, but the keeps the input.
2022-01-13 23:16:03 +02:00
Itai Y. Efrat
39ed5eb9ec bump: :completion vertico
minad/consult-flycheck@92b259e6a8 -> minad/consult-flycheck@0ad7e8ff15
minad/consult@57dc1adfdc -> minad/consult@85008702de
minad/marginalia@678b6528f3 -> minad/marginalia@2fb2787bc3
minad/vertico@75f33e3620 -> minad/vertico@eedcb84786
oantolin/embark@5b34b2b603 -> oantolin/embark@725794f013
oantolin/orderless@62f71c34ba -> oantolin/orderless@1ccf74ffdb

Remove +vertico-embark-vertico-indicator as it has been implemented upstream
2021-12-13 01:18:11 +01:00
Henrik Lissner
6130caa621 feat(vertico): remap evil-show-registers to consult-register
A follow up to 49a464a.

Fix: #5753
Ref: 49a464a870
2021-11-21 15:37:11 +01:00
Itai Y. Efrat
a310fb4a77 bump: :completion vertico
minad/consult@39f41edda6 -> minad/consult@57dc1adfdc
minad/marginalia@09d8ab38a5 -> minad/marginalia@678b6528f3
minad/vertico@0df38cf1d7 -> minad/vertico@75f33e3620
oantolin/embark@d09fff2da7 -> oantolin/embark@5b34b2b603

Update vertico-repeat configuration due to upstream changes.
2021-11-19 00:31:13 +02:00
Itai Y. Efrat
5b630e1723 feat(vertico): add consult-dir package 2021-11-19 00:31:12 +02:00
Itai Y. Efrat
8a2b7badc7 fix(vertico): remove unneeded manual preview...
from +vertico/search-symbol-at-point.

It only acts on buffers so it shouldn't have been there in the first
place.
2021-11-19 00:29:51 +02:00
Itai Y. Efrat
423939033f fix(vertico): which-key buffer on embark prompter
The which-key buffer now disappears immediately on using
embark-completing-read-prompter, instead of only after further user
input.
2021-11-19 00:29:49 +02:00
Itai Y. Efrat
6e629c1c53 refactor(vertico): move defadvice!'s to config.el
The vast majority of Doom modules have their defadvice! statements in
their config.el files, and not their autoloads. Since these don't need
to be autoloaded to function, we move them for better consistency.
2021-11-18 22:41:40 +02:00
Itai Y. Efrat
6eb52a8536 revert: fix(vertico): add +vertico/find-file-in stopgap
This is no longer needed since #5494 was fixed.

Ref #5494
Revert 8b3b39532d
2021-10-10 11:17:39 +03:00
Itai Y. Efrat
8b3b39532d fix(vertico): add +vertico/find-file-in stopgap
Temporarily disable embark actions (and as a result, marginalia
annotations) for +vertico/find-file-in and functions that use it, since
because currently the embark actions don't inherit the intended
default-directory, embark actions might run unintentional destructive
operations if there are files with the same name in the
default-directory and the directory +vertico/find-file-in is run on.

Ref #5494
2021-09-23 14:55:58 +02:00
Itai Y. Efrat
a612220369 refactor!(vertico): evil minibuffer keybindings
BREAKING CHANGE: remove +vertico/(next|previous)-candidate-preview.

BREAKING CHANGE: Move vertico-(next|previous)-group to C-M-j/k now that

C-S-j/k now default back to scrolling up and down pages.

Update docs to reflect these changes.
2021-09-15 01:41:37 +03:00
Itai Y. Efrat
6022579231 refactor(vertico): +vertico-consult-fd-args
Initialize as nil with a defvar, and only change the value if the user
hasn't set it themselves.
2021-09-15 01:07:06 +03:00
Itai Y. Efrat
9241a4d709 refactor(vertico): file completion backspace
Switch from the homemade +vertico/backward-updir to the upstream
vertico-directory-delete-char. The former has the nice feature of
traversing up abbreviated paths, but this comes at the cost of not being
able to fully erase the path (since the buck stops at /), and
unintentional directory moving in commands such as +vertico/find-file-in
which causes issues. Overall this minor convenience is not worth it, so
the vertico-directory-delete-char behaviour of just deleting up to the
previous / is preferred instead.
2021-09-15 01:03:11 +03:00
Itai Y. Efrat
161d48c2a9 refactor(vertico): embark package actions map
- use new variable +vertico/embark-doom-package-map instead of
overriding embark-package-map
- define it with embark-define-keymap in order to inherit from the
default keymap
2021-09-15 01:03:11 +03:00
Itai Y. Efrat
1f3ac1eb77 nit(vertico): fix whitespace 2021-09-15 01:03:11 +03:00
Itai Y. Efrat
934ad07f23 feat(vertico): add magit-status embark action 2021-09-15 01:03:11 +03:00
Itai Y. Efrat
9e3a5df15d fix(vertico): feature gate embark workspace action 2021-09-15 01:03:11 +03:00
Itai Y. Efrat
fc163b16c9 feat(vertico): use basic completion for remotes
Close: #5313

Co-authored-by: Stefan Lendl <ste.lendl@gmail.com>
2021-09-15 01:03:11 +03:00
Itai Y. Efrat
0a69ca957a refactor(vertico): rename which key indicator
rename +vertico/embark-which-key-indicator to
+vertico-embark-which-key-indicator, since it's not interactive
2021-09-14 20:38:40 +03:00
Itai Y. Efrat
c0fd2c37cd feat(vertico): add char-fold style dispatcher
affixing with % uses char-fold-to-regexp on the input
2021-09-14 20:38:40 +03:00
Itai Y. Efrat
26014435b2 feat(vertico): colorize vertico candidate on act 2021-09-14 20:38:40 +03:00
Itai Y. Efrat
940f66fa89 bump: :completion vertico
iyefrat/all-the-icons-completion@d1d4b2f0df -> iyefrat/all-the-icons-completion@9650041854
minad/consult@69bbd213dc -> minad/consult@105a1ac501
minad/marginalia@1123544536 -> minad/marginalia@c6ca58bea8
minad/vertico@9de6709cdd -> minad/vertico@81a4b35f8d
oantolin/embark@1a7e6b5561 -> oantolin/embark@19145d5a33
oantolin/orderless@1e84120a28 -> oantolin/orderless@1a7011ac9c

- Adapt consult async commands to new consult-x-args format instead of
  consult-x-command.
- Change regepx in +vertico-file-search to emacs instead of pcre,
  because consult switched to using only emacs regexps
- Move to new embark-indicators variable, and replace
  embark-mixed-indicator with +vertico/embark-which-key-indicator to be
  compatible with future changes
- Adapt Doom's optional usage of fd to new consult command format
2021-09-14 20:38:40 +03:00
Itai Y. Efrat
4613c74d8b fix(vertico): prefix-help-command
- move the setq to the embark use-package where it belongs
- also set which-key-use-C-h-commands to nil, otherwise sometimes
  which-key will override the prefix-help-command setting
2021-09-14 20:38:40 +03:00
Henrik Lissner
a2a128d3a5 tweak(vertico): prefix-help-command = embark-prefix-help-command
Embark's interface of prefix-help-command is so vastly superior to the
original prefix-help-command that it makes good sense that it be a
default.
2021-08-05 12:54:37 -04:00
Henrik Lissner
045ea7460d nit: revise and reformat code comments 2021-08-04 01:53:12 -04:00
Itai Y. Efrat
a23cb1fddf fix(vertico): consult-recent-file previews
Turning on `recentf-mode` in a `cmd!` (introduced in 97048e2) means that
the `consult-customize` that turns off the previews doesn't work. This
is fixed by advising the function instead.
2021-07-31 10:47:00 +03:00
Itai Y. Efrat
859fc4e1b1 feat(vertico): improve marginalia annotations
- use `doom-project-root` in the annotation category
  `project-file` (marginalia uses `project.el`)
- annotate more functions, alphabetize list
2021-07-31 10:46:00 +03:00
Itai Y. Efrat
4c3c027a96 feat(vertico): better crm interface 2021-07-31 10:43:00 +03:00
Itai Y. Efrat
d6fba19586 bump: :completion vertico
minad/consult@28f9ba8 -> minad/consult@69bbd21
minad/marginalia@a3a8edb -> minad/marginalia@1123544
minad/vertico@4a90297 -> minad/vertico@9de6709
oantolin/embark@be03ce9 -> oantolin/embark@1a7e6b5
iyefrat/all-the-icons-completion@24cdb3b -> iyefrat/all-the-icons-completion@d1d4b2f

update embark indicator to new format
2021-07-31 10:41:00 +03:00
Henrik Lissner
a6b6b6197b fix(vertico): TAB bound to non-interactive function 2021-07-28 13:11:45 -04:00
Henrik Lissner
9d7338d4b8 fix(vertico): add +ivy/jump-list analogue
Fix 'SPC s j' for consult users.
2021-07-28 13:11:36 -04:00
Henrik Lissner
551e5adf81 fix(vertico): unreachable function in autoloads
+ Rename +vertico--embark-target-package to
  +vertico-embark-target-package-fn to conform to naming conventions,
  and because it's not a private function anymore.
+ Fix +vertico-embark-target-package-fn's indentation.

Fix #5208
2021-07-28 12:43:05 -04:00
Henrik Lissner
ffcfb6d8b3 tweak(vertico): tune consult async timers
For a more responsive UX.
2021-07-28 12:03:42 -04:00
Henrik Lissner
d7a223493e completion/vertico: consult-async-min-input = 2
Legitimate two-letter searches are common enough in codebases that
consult-async-min-input's default value of 3 catches me up more often
than not.
2021-07-26 02:56:46 -04:00
Henrik Lissner
97048e2db4 completion/vertico: lazily activate recentf-mode
This'll do for now.
2021-07-25 18:03:12 -04:00
Henrik Lissner
cac9158b36 completion/vertico: use fd for counsel-find
If available.
2021-07-25 18:02:46 -04:00
Henrik Lissner
b92caaa3c2 completion/vertico: reformatting 2021-07-25 15:47:58 -04:00
Henrik Lissner
cfcf7e0d03 Open embark grep buffers in popup 2021-07-25 15:47:58 -04:00
Itai Y. Efrat
e2cd827f96 vertico: add variable to set company completion styles 2021-07-25 02:52:04 +03:00
Itai Y. Efrat
c12fb64c98 vertico: defer loading of embark and orderless 2021-07-25 02:52:04 +03:00
Itai Y. Efrat
3f1016753d vertico: various refactors...
- unify `map!` statements when possible
- rename `+vertico--embark-target-package!` to
  `+vertico--embark-target-package` and autoload it
- set `completion-in-region-function` to a wrapper function instead of
  changing it with a hook
- use `:override` advice instead of `fset` for `multi-occur`
- document what `vertico-directory-tidy` does
- move `:init` contents to `:config` when possible
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
29bd530970 vertico: use vertico-directory-tidy
cleans up shadowed paths automatically
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
d0f4c5f03c vertico: use all-the-icons-completion-marginalia-setup 2021-07-25 02:52:04 +03:00
Itai Y. Efrat
099f8510bb vertico: add consult buffer source for org buffers 2021-07-25 02:52:04 +03:00
Itai Y. Efrat
41e657f70f vertico: remove :demand t from use-package's
It didn't do anything for the `orderless` statement, and we can setup
`embark-consult` correctly without it.
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
a0eb4e9b65 completion/selectrum -> completion/vertico, part 3
- Rename all functions and variables in the module to reflect the
  namechange (and the irc jump function)
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
24eaa1317c completion/selectrum -> completion/vertico, part 2
- Rename module from `:completion selectrum` to `:completion vertico`
- Rename all files involved
- Do *not* yet rename all the functions, as that messes up git's rename
  detection.
2021-07-25 02:51:15 +03:00
Renamed from modules/completion/selectrum/config.el (Browse further)