Commit graph

90 commits

Author SHA1 Message Date
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Liam Hupfer
76f309ceb5 tweak(vertico): show entire path for fd results
Currently, fd does not expose a way to match against only the path
components beneath the target path. When --full-path is specified, the
pattern matches against all components. For example, executing
consult-fd from /home/hlissner/.emacs.d with `home` as the query would
match every file (not excluded by other arguments) under .emacs.d.
Despite this --full-path behavior, fd still outputs relative paths, so
the user cannot even determine why some candidates are returned.

Until there is a method to match only against subdirectories, use
--absolute-path to at least to show the user why all matches are
occurring.

Ref: https://github.com/sharkdp/fd/issues/839
2024-01-27 23:34:56 +02:00
Liam Hupfer
25a89491a3 nit(vertico): remove default --regex option for fd
Ref: eac20a8132
2024-01-27 23:34:56 +02:00
Liam Hupfer
cb62ec0905 tweak(vertico): use fd’s smart case
If the user is going to the trouble of capitalizing input, that’s
probably all they want to match.

Ref: 6482f3ac09
2024-01-27 23:34:56 +02:00
Itai Y. Efrat
7803ea2e73 fix(vertico): consult-project(-root->)-function 2024-01-27 23:34:56 +02:00
Itai Y. Efrat
60e22fd2eb refactor(vertico): use consult-fd
Close: #7458
Co-authored-by: LemonBreezes <look@strawberrytea.xyz>
2024-01-27 23:34:56 +02:00
Liam Hupfer
2497d58e9a fix(vertico): ensure recentf-mode for consult-buffer
`consult-buffer` uses `recentf` to populate file candidates. It is not
uncommon to use `consult-buffer` as a single entry point to buffers,
bookmarks and recent files, effectively replacing `recentf` and
`consult-recent-file`.

To improve startup performance, Doom enables `recentf-mode` after the
first file is opened (0e851ace9b). When executing `consult-buffer` at
startup, `recentf-mode` won’t be enabled yet. Add it to the
`consult-recent-file` advice to ensure that can’t happen.

Unlike `consult-recent-file`, `consult-buffer` does have significant
functionality without `recentf-mode`, but for the tiny fraction of Doom
users that disable `recentf-mode`, this is easy enough to
`advice-remove`.

Fix: https://github.com/doomemacs/doomemacs/issues/7461
2023-10-05 17:42:55 +02:00
Ellis Kenyő
9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00
Ellis Kenyő
5be4517bca
refactor(vertico): consult-dir: drop dependence on docker-tramp
Removes the dependence on docker-tramp, can later be cleaned up with
`tramp-container--completion-function` when we drop support for <29.
2023-09-07 20:18:12 +02:00
Liam Hupfer
3d82e3d46d fix(vertico): gate which-key integration
This prevents an error for users disabling which-key.
2023-09-02 11:46:42 -05:00
Jeetaditya Chatterjee
4696f0d4ce
tweak(syntax): feat gate flycheck in all modules 2023-07-25 00:11:09 +01:00
Henrik Lissner
4e105a95af
refactor(vertico): take evil keybinds from :config default 2023-03-22 18:29:38 -04:00
Benedikt Broich
890f200b41
feat(vertico): bind C-h/C-l to enter-or-preview/move up
Close: #7001
Ref: #6853
2023-03-22 17:57:38 -04:00
Ellis Kenyő
344178c208
fix(vertico): docker-tramp => tramp-container
Amend: 1b9f93859f
Ref: #6986
2023-02-21 18:28:34 -05:00
shartf
92c9e93ed7
fix(vertico): consult-theme: invalid preview key error
Fix: #7064
Amend: 642f88ad99
2023-02-21 04:54:26 -05:00
Henrik Lissner
1b9f93859f
fix(vertico): gate docker config for emacs 29+
Redundant with tramp-container, which is used in Emacs 29 and newer.

Ref: #6986
Amend: d41cf4e518
Co-authored-by: elken <elken@users.noreply.github.com>
2023-02-20 20:11:22 -05:00
Itai Y. Efrat
c467b1c9d3 feat(vertico): remap Info-search to consult-info 2023-02-17 12:34:58 -05:00
Itai Y. Efrat
642f88ad99 bump: :completion vertico compat consult-lsp magit git-commit
emacs-straight/compat@7ca7d300d1 -> emacs-straight/compat@2bedcb5ea9
mhayashi1120/Emacs-wgrep@f9687c28bb -> mhayashi1120/Emacs-wgrep@edf768732a
minad/consult-flycheck@7a10be316d -> minad/consult-flycheck@51b1b48e8d
minad/consult@16b2dc5e34 -> oantolin/orderless@ae849b3d9f
minad/marginalia@c1365bf0c7 -> minad/marginalia@6d48ed54be
minad/vertico@bedd146c3f -> minad/vertico@f303790546
oantolin/embark@629cce948c -> oantolin/embark@4882b395ce
oantolin/orderless@847694e78c -> minad/vertico@f303790546
tumashu/vertico-posframe@a3d0802d7b -> tumashu/vertico-posframe@790f74b49d
gagbo/consult-lsp@58b5414762 -> gagbo/consult-lsp@f8db3252c0
magit/magit@0ef98ef518 -> magit/magit@6d325d90ba

consult-lsp needed to be bumped to work with some changed consult
internals, and due to compat shenanigans we have to bump magit to latest
as well.

Includes fixes to stay up to date with upstream api changes to.
consult-customize and the deprecation of embark-define-keymap

Close: #7064
2023-02-17 12:34:58 -05:00
Itai Y. Efrat
32599972ff refactor!(vertico): remove consult-apropos remap
BREAKING CHANGE: This command is obsolete since 0.20; consult-apropos
has been deprecated in favor of Embark actions: M-x describe-symbol
<regexp> M-x embark-export M-x describe-symbol <regexp> M-x embark-act a
2023-02-17 12:34:26 -05:00
Itai Y. Efrat
e96624926d refactor!(vertico): remove multi-occur override
BREAKING CHANGE: remove override of multi-occur with consult-multi-occur

`consult-mulit-occur` is deprecated, and although it does have the
replacement `consult-line-multi`, I don't think that this override makes
much sense, as doom doesn't really touch `multi-occur` anywhere and this
would mostly be suprising to users that do use it.
2023-01-01 21:55:13 -05:00
Itai Y. Efrat
986603063f refactor!(vertico): remove consult-preview-at-point-mode hook
BREAKING CHANGE: That function is only meant to be used in
the *Completions* buffer, which is only relevant if you're using embark
and consult without vertico. While it doesn't hurt, it's mostly unclear
why it's there in the first place when reading the modules
2022-12-01 04:01:13 +01:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
4071d27263
fix(vertico): popup rule for embark export buffers
Embark Export buffers have changed their name from "*Embark Export Grep
...*" to "*Embark Export: ...*".

Fix: #6465
2022-06-18 08:19:46 +02:00
Henrik Lissner
24c658bae9
fix(vertico): ensure load order of consult & embark
The precise semantics of use-package's :after keyword is janky (see
jwiegley/use-package#829) and, in the case of 992bd8f7e2, causes
subtle breakage. For one, the remappings in the following :init block
were deferred until embark loaded, so they weren't available at startup,
so they reverted to their old (often vastly inferior) predecessors, like
recentf-open-files instead of consult-recent-files.

Amend: 992bd8f7e2
2022-06-17 20:48:13 +02:00
Ellis Kenyő
4389e2b1c5
feat(vertico): add tramp sources to consult-dir
Fix: #6258
2022-06-17 19:57:32 +02:00
iyefrat
992bd8f7e2
fix(vertico): load consult after embark
Currently, embark-consult bindings don't get loaded if consult hasn't
been loaded yet, leading to missing embark actions until the first
manual consult load.
2022-06-17 18:42:42 +02:00
Daanturo
7c676c83bc tweak(vertico): use setq-default to set completion-in-region-function
Corfu makes completion-in-region-function a local variable in buffers
where it is enabled, so when this form is evaluated in one of those said
buffers (such as opening a file with Emacs before accessing the
minibuffer), completion-in-region-function will just be set locally
there.
2022-06-17 18:40:34 +02:00
Itai Y. Efrat
ebbebc53a6 tweak(vertico): add basic completion style fallback
This is now the recommended configuration, see the referenced issue.

Ref: oantolin/orderless#111
2022-05-26 23:55:01 +03:00
Itai Y. Efrat
7ed1f96b0b feat(vertico): add crm indicator 2022-05-26 23:55:01 +03:00
Itai Y. Efrat
4cecc654b9 fix(vertico): consult tofu regex range 2022-05-26 23:55:01 +03:00
Itai Y. Efrat
1f25c3510f feat(vertico): add workarounds for problematic commands 2022-05-26 23:55:01 +03:00
Itai Y. Efrat
08f32e6d0f tweak(vertico): improve org consult source
- only add if :lang org is on
- have a version that works before org is loaded
2022-05-26 01:18:02 +03:00
Itai Y. Efrat
c13b59395c bump: :completion vertico
minad/consult@d30213aa20 -> minad/consult@822928a860
minad/marginalia@dbc37b373e -> minad/marginalia@26f2bd9ee7
minad/vertico@46e8e05650 -> minad/vertico@cc5f5421c6
oantolin/embark@2890e535f5 -> oantolin/embark@d88478b45f
oantolin/orderless@8f64537f55 -> oantolin/orderless@75eeae2197

- Remove everything related to `consult-completing-read-multiple` since
the function has been deprecated upstream due to implementation issues

Ref: minad/consult#567
Close: #6352
2022-05-26 01:18:02 +03:00
Henrik Lissner
65ff263668
fix(vertico): backspace keybind for tty users
The input event, [backspace], is only emitted in GUI Emacs, not TTY
Emacs.

Ref: https://discourse.doomemacs.org/t/2491/3
2022-04-22 23:36:05 +02:00
Sean Farley
ece4a74a9b feat(vertico): add +childframe option similar to ivy 2022-04-15 21:24:34 +02:00
Henrik Lissner
0e48c22c3e
fix(vertico): missing closing paren
And correct minor formatting inconsistencies.

Amend: c39acf284b
2022-04-12 02:51:38 +02:00
Itai Y. Efrat
c39acf284b refactor(vertico): don't suppress compression errors
This was fixed upstream

Ref: minad/marginalia#132
2022-04-12 02:32:20 +02:00
Itai Y. Efrat
fd50f388a4 refactor!(vertico): fix embark-collect and rebind to C-c C-l
BREAKING CHANGE: `embark-collect-snapshot` has been renamed upstream to
`embark-collect`. Since the `C-s` mnemonic doesn't really make sense
anymore, I've moved the binding to `C-c C-l`, which has the nice bonus
of being next to the similar `C-c C-;`, and being nicer.
2022-04-12 02:32:20 +02:00
Henrik Lissner
394f7be6c5 bump: :completion vertico
minad/consult@0940ca0165 -> minad/consult@2106eee75f
minad/marginalia@9229d88ae4 -> minad/marginalia@e9540a7b80
minad/vertico@a8fe9a0b2e -> minad/vertico@509ca602c7
oantolin/embark@c9b26c2e18 -> oantolin/embark@56e28c23d5
oantolin/orderless@1ccf74ffdb -> oantolin/orderless@ce462a63e3

- Marginalia introduced library annotations in
minad/marginalia@5e646cc (minad/marginalia#127), which opens us up to
  corner cases where decompression of library files (to retrieve their
  description) fails and brings down  vertico with it.
  marginalia--library-doc has been advised to suppress these errors.

Fix: #6099
Ref: minad/marginalia@5e646cc3f6
Ref: minad/marginalia#127
2022-02-10 21:07:20 +01:00
Paul Porfiroff
a922ff8837 fix(vertico): completion category of +default/find-file-under-here 2022-01-28 21:01:34 +01:00
Itai Y. Efrat
f42f923350 feat(vertico): add SPC s e to manual preview list 2022-01-13 23:16:03 +02:00
Itai Y. Efrat
6d31e392cd nit(vertico): lint embark-file-map bindings 2022-01-13 23:16:03 +02:00
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