Commit graph

302 commits

Author SHA1 Message Date
Henrik Lissner
4fcf332749
refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these
doom-projectile-* variables need to be generalized, starting with the
fd/ripgrep executable paths.

ALong with that, this refactors Doom's projectile-generic-command to
lean more on built-in fd support in projectile, where possible (fewer
wheels reinvented).

Ref: doomemacs/core#1
2024-08-09 21:03:37 -04:00
Henrik Lissner
234cc27b77
fix(ivy): +counsel-rg-suppress-error-code-a
Corrects the signature of process-exit-status.

Amend: 6ef86098cb
2024-07-10 04:02:21 -04:00
Henrik Lissner
6ef86098cb
fix(ivy): counsel-rg dying on non-zero exit code
Monkey-patches counsel-rg to ignore non-zero exit codes. This may have
other side effects, but despite it still producing workable resutls, the
command will discard all its results if there are any errors while
scanning a directory.

Ref: abo-abo/swiper#2339
Fix: #3038
2024-07-10 03:55:03 -04: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
Henrik Lissner
c5d4f818d1
fix(ivy): void-function nerd-icons-ivy-rich-mode error
Amend: 9787022b83
2023-09-14 01:11:05 +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
Henrik Lissner
f427c8a30e
tweak: scroll-conservatively = 10
Forces the window to recenter if the cursor moves >=10 lines off-screen.
This makes some of our manual recentering elsewhere unnecessary.
2023-09-11 23:53:36 +02:00
theschmocker
de2f538fd6 fix(ivy): ensure flx is loaded with (ivy +fuzzy)
Overriding `ivy--flx-featurep` here would always prevent flx from being
loaded and enabled---even if it were `t`---because ivy `require`s it in
`ivy--flx-featurep`'s initvalue. So instead, this sets the variable if
and only if it should be disabled. Because flx isn't installed when
+prescient is enabled, I've included that in the condition for disabling
ivy--flx-featurep as well

Fix: https://github.com/doomemacs/doomemacs/issues/6034
Amend: bae7ab0d8d
2022-09-16 01:26:36 +02: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
77e9932966
bump: :core
Fuco1/smartparens@37f77bf2e2 -> Fuco1/smartparens@ec15aaa748
Wilfred/helpful@67cdd1030b -> Wilfred/helpful@209971ba9f
bbatsov/projectile@f3468e8d20 -> bbatsov/projectile@4d6da873ae
domtronn/all-the-icons.el@65c496d3d1 -> domtronn/all-the-icons.el@ca1ef30004
emacs-straight/project@4fe1eec803 -> emacs-straight/project@c52ec93689
jscheid/dtrt-indent@66fc30af02 -> jscheid/dtrt-indent@57f4072fa8
justbur/emacs-which-key@1217db8c63 -> justbur/emacs-which-key@1ab1d0cc88
raxod502/straight.el@e2de88ea0e -> radian-software/straight.el@0e204d418d

Includes a fix for #5207 (see radian-software/straight.el#955), which
occasionally caused arrayp errors when installing/upgrading packages.

Fix: #5207
Ref: radian-software/straight.el#955
2022-06-17 18:21:23 +02:00
Gavin Downard
499cf5e626 tweak(ivy): use helpful for counsel descbinds
`counsel-describe-symbol-function' still doesn't use `helpful-symbol'
because `helpful-symbol' throws up a prompt when the symbol refers to
both a function and a variable.
2022-04-06 20:40:26 +02:00
Henrik Lissner
8455bcf6b4
fix(ivy): omit hidden files in counsel-file-jump
385e60cd26 was a bit hasty. Rather than disregard all ignore files, we
should simply exclude projectile-globally-ignored-directories entries
from the file list. This is a stop-gap measure while I work on a better,
more general solution for all our :completion modules.

Amend: 385e60cd26
Ref: https://www.reddit.com/r/emacs/comments/tj0na6/moving_from_doom_to_vanilla/?utm_source=share&utm_medium=web2x&context=3
Ref: #6210
2022-03-30 17:32:41 +02:00
Henrik Lissner
385e60cd26
fix(ivy): include hidden files in counsel-file-jump
fd was omitted ignored/hidden files, which is inconsistent with
ripgrep's output (when fd is absent).

Ref: https://www.reddit.com/r/emacs/comments/tj0na6/comment/i1laya6/?utm_source=reddit&utm_medium=web2x&context=3
2022-03-22 02:13:17 +01:00
Henrik Lissner
49a464a870 fix(default): missing evil-ex-registers for non-ivy users
It was `evil-show-registers' that we wanted, not
`evil-ex-registers' (which never existed in the first place). Folks who
did not have :completion ivy enabled (e.g. vertico and helm users) would
see 'commandp, evil-ex-registers' errors when pressing `SPC i r`. Folks
who had it enabled would transparently invoke `counsel-evil-registers'
instead (because it was remapped).

Fix: #5753
2021-11-21 15:34:57 +01:00
Henrik Lissner
bae7ab0d8d fix(ivy): remove hard dependency on flx
Ivy tries to load flx to determine if fuzzy capabilities should be
enabled by default, causing #5681. Let's not do that.

Fix: #5681
Close: #5690
2021-10-29 14:48:32 +02:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Itai Y. Efrat
b3dfd4758d don't explicitly set projectile-completion-system
The default value is `'auto`, which handles the detection of the active
completion system, see the definition of `projectile-completing-read`.
2021-07-03 15:20:59 +03:00
Daanturo
18a149b3e3 Add :not counsel-org-goto to ivy-prescient-sort-commands 2021-05-26 16:46:24 +07:00
Itai Y. Efrat
8a40e83ab5 unicode-chars-list-chars -> insert-char
`unicode-chars-list-chars` doesn't seem to be an actual function (not
defined in emacs or found online), and `insert-char` seems like what one
would want here.
2021-05-13 17:04:16 +03:00
Orlando Osorio
0fb8136b3b Add counsel-jq to ivy-prescient-sort-commands 2021-05-07 21:18:56 -04:00
Henrik Lissner
a0de71dee8 Fix #4886: fix +ivy-buffer-preview for SPC b B 2021-04-18 12:43:00 -04:00
daanturo
b317910b6e Add counsel-outline to ivy-prescient-sort-commands 2021-04-12 18:29:24 +07:00
Henrik Lissner
62df2c386a Fix #4766: workaround for ivy-prescient wrong-type-arg error
ivy-resume + prefix arg = resume named session, but throws an error when
ivy-prescient is present.
2021-03-10 10:48:57 -05:00
daanturo
ba02790ba0 Enable ivy-rich-project-root-cache-mode. 2021-02-08 11:43:17 +07:00
datool
20c6246313
Remap describe-symbol to counsel-describe-symbol . (#4593)
* Remap `describe-symbol` to `counsel-describe-symbol` .
"SPC h o" now uses `counsel-describe-symbol` instead of plain `helpful-symbol` (maybe with completion) to get input.

* Remove counsel-describe-symbol-function change

Co-authored-by: Henrik Lissner <henrik@lissner.net>
2021-01-30 18:24:25 -05:00
JerryChu
b4fbafe451 Fix path separator in msys2 2021-01-21 14:10:14 +08:00
Henrik Lissner
b6d8a98402 Fix +ivy--set-jump-point-maybe-h: wrong-type-argument markerp 2021-01-18 19:59:18 -05:00
Henrik Lissner
39deb6aedb
Resolve remote path to fd/rg for counsel-find-file 2021-01-08 17:14:27 -05:00
Henrik Lissner
34c5dad750
Add value+docstring columns to doom/help-custom-variable
When used with ivy. Also: slight refactor of doom/help-custom-variable.
2021-01-05 19:29:19 -05:00
Alois Janíček
8afd8a6ce8
Restore user ability to toggle ivy related hydras
There are two hydras that can be opened from ivy interface:

1. `ivy-dispatching-done' (doom key: "C-o", vanilla key: "M-o")
2. `hydra-ivy/body'       (doom key: "M-o", vanilla key: "C-o")

Original behavior is that they both can be exited / toggled
by the same key they were opened.

This commit restores the original behaviour but does it without
reverting the decision to swap the "C-o" and "M-o" key bindings.
2020-12-15 00:28:50 +01:00
Alois Janíček
e7696893f4
ivy-read-action-function = ivy-hydra-read-action
Use hydra to read user action when calling `ivy-dispatching-done`
2020-12-15 00:10:29 +01:00
Henrik Lissner
65416ff472
Fix #4427: ivy-read-action-format-function = ivy-read-action-format-columns
And remove max-mini-window-height, which interferes with ivy's own
minibuffer resizing logic, and isn't a terribly helpful default anyway.
2020-12-13 15:42:52 -05:00
Henrik Lissner
89db59769d
Re-enable ivy in evil-ex completion
Seems its earlier issues are no longer a problem.
2020-12-12 15:56:36 -05:00
Henrik Lissner
765b6dcfca
Unset unused markers
In case of overlay leaks.
2020-12-12 15:56:36 -05:00
Henrik Lissner
c4a0174fe2
ivy-read-action-format-function = ivy-hydra-read-action
Makes ivy's C-o dispatching commands easier to see.
2020-12-12 15:56:36 -05:00
Stefan Lendl
7b11f67c76 counsel-bookmark use filename only if available
fixes #4344
2020-12-01 16:14:49 +01:00
Henrik Lissner
7febca1988
Merge pull request #3414 from Andre0991/add-ivy-avy
Add `ivy-avy`
2020-11-27 23:26:08 -05:00
Henrik Lissner
db66b8af31
Omit .git from projectile-find-file & ocunsel-file-jump 2020-11-16 20:10:26 -05:00
Henrik Lissner
cfcd010cd6
Revert ivy-magic-slash-non-match-action to nil 2020-11-16 19:26:27 -05:00
Henrik Lissner
bba035a1a2
Fix void-function +ivy-prescient-non-fuzzy in daemon 2020-10-16 23:42:59 -04:00
Henrik Lissner
35185b2175
Split doom-reload-hook into before/after hooks 2020-10-16 22:28:08 -04:00
Henrik Lissner
8024f4edf9
Fix #3215 (again): --path-separator /
Use a single slash.
2020-09-01 06:45:04 -04:00
Mike Chen
93795633dd
fix ivy not working well with lsp-ivy-workspace-symbol
More details here: emacs-lsp/lsp-ivy#18 (comment)
2020-08-26 15:09:52 +08:00
Henrik Lissner
d02d78c3fa
Make find-file-in-project faster in large projects 2020-08-13 17:02:25 -04:00
Henrik Lissner
db7b2f6da9
completion/ivy: show chevron on highlighted item in tty
So its easier to see in the terminal, where some themes may not have a
visible background for the current match.
2020-08-07 23:07:51 -04:00
Henrik Lissner
89915715a6
Fix #3586: truncated filenames from counsel-file-jump
When using ripgrep instead of fd.
2020-07-18 19:40:01 -04:00
Henrik Lissner
523e945a3a
Fix #3215: ripgrep reporting error code 2 on Windows
Closes #3512
2020-07-17 19:24:26 -04:00
Andre Peric Tavares
41b237e06e
Add ivy-avy
`ivy-avy` makes it possible to select a candidate with `avy` by using `C-'` in an ivy minibuffer.
This functinally used to come with `swiper`, but it was split: https://github.com/melpa/melpa/pull/6951
2020-06-18 23:18:26 -03:00
Henrik Lissner
235ad55ba1
Force counsel-rg-base-command to be a list
Counsel allows `counsel-rg-base-command' to be a string or list. This
backwards compatibility is a maintenance burden for Doom, so it's
simpler to force it to always be a list.
2020-06-07 13:58:12 -04:00
Henrik Lissner
85883facf5
Bump :completion ivy
Yevgnen/ivy-rich@3f818b2 -> Yevgnen/ivy-rich@1097013
abo-abo/swiper@04ca164 -> abo-abo/swiper@544e7de
ericdanan/counsel-projectile@126e825 -> ericdanan/counsel-projectile@77392cb
tumashu/ivy-posframe@ae9bafe -> tumashu/ivy-posframe@4474956
2020-06-05 01:19:03 -04:00