Commit graph

103 commits

Author SHA1 Message Date
Henrik Lissner
d3124c4971
nit: add deprecation comments for projectile config
Ref: doomemacs/core#1
2024-08-09 20:42:33 -04:00
StrawberryTea
4f07e83b6e fix(vertico): missing command error in consult
Although it is rare for a user to not enable the :config default module,
enabling/disabling modules one-by-one is common practice for debugging
Doom Emacs. This PR fixes an error that occurs when you have :completion
vertico enabled without enabling :config default.
2024-04-06 00:14:47 -04:00
Henrik Lissner
22fa4ccac7
tweak(vertico): consult-dir: use projectile 2024-04-01 13:44:25 -04:00
Henrik Lissner
18c88621a4
refactor(vertico): don't use bind-key
This is the only internal usage of :bind, which I want to avoid, because
it pulls in bind-key, which offers no real benefit over just about any
other key binding function or macro, so I'd rather use what is already
available (like map!).
2024-03-24 18:03:12 -04:00
Sean Farley
d3a00ba6af nit(vertico): fix spelling in some docstrings 2024-03-21 11:29:19 -04:00
Sean Farley
222dc47060 feat(vertico): add orderless annotation filtering
Ref: oantolin/orderless#162
2024-03-21 11:29:19 -04:00
Henrik Lissner
d22fa5a670
fix(vertico): consult-dir: don't guess user from containers
The tramp string used to connect to the container uses the first
`container-runtime ps` argument as a username, but the first argument
returned is the container ID, not a username.

Close: #7674
Co-authored-by: bergmannf <bergmannf@users.noreply.github.com>
Co-authored-by: elken <elken@users.noreply.github.com>
2024-03-20 03:09:05 -04:00
Henrik Lissner
0ea84d1c3b
feat(vertico): add consult-yasnippet
Close: #7471
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-03-20 00:16:29 -04:00
Luigi Sartor Piucco
0588b42b46
feat(corfu,vertico): use equal orderless config
This removes the old `&` separator for Vertico (does anyone use that
instead of just space?) in favor of escapable space and unifies
orderless config with Corfu. Also implements smart separator
insert/escape/reset on `C-SPC`

Co-authored-by: Liam Hupfer <liam@hpfr.net>
2024-03-19 20:41:50 -03:00
Dev380
7018cb45fb
fix(vertico): disable minor mode highlight duly
Minor mode highlights did not disable as long
as the mode was enabled.

Amend: #7706
2024-03-10 00:54:06 -05:00
Dev380
d657be1744
feat(vertico): completion highlights a la ivy
* feat(vertico): completion highlights a la ivy

Adds completion highlighting that works similarly to ivy/counsel's
one (which is enabled by default). It'll highlight enabled major/minor
modes and directories in a different face. On by default.

Ref: https://github.com/minad/vertico/wiki#candidate-display-transformations-custom-candidate-highlighting

* fix(vertico): major mode not being highlighted

The major mode was not being highlighted correctly;
it should work now that the buffer is set correctly in
`+vertico-highlight-enabled-mode`.

* fix(vertico): make font lock prioritize match over type

The mode and directory highlights were [overriding the match
font-lock](https://github.com/doomemacs/doomemacs/pull/7706#issuecomment-1977722188).
This should resolve that by prioritizing the match font lock using
`'append` on `add-face-text-property` instead of `propertize`.
2024-03-08 20:21:36 -05:00
45mm
78b85b8a72 fix(vertico): mapping for embark open in workspace
We should always bind to both "TAB" and "<tab>" - if they have been
mapped to different commands anywhere, Emacs will no longer treat them
as equivalent.
2024-03-05 01:13:39 -05:00
Henrik Lissner
fe776f8d84
fix(vertico): use remote fd in tramp buffers 2024-02-14 02:42:30 -05:00
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