I'm reducing the scope of our project search so we can eventually focus
on ripgrep. By specializing I can extend Doom's features for project
searching.
Uses the most basic, uncustomized shell to a) prevent interference
caused by slow shell configs and b) speed up project text searches. This
comes at the cost of isolating these programs from envvars that the user
may have set in their shell configs in order to change
ag/rg/pt/git-grep/grep's behavior.
If this bothers you, change +ivy-file-search-shell to your shell (or
to the value of `shell-file-name`).
Possibly relevant to an issue mentioned in #1260
- Highlights remote/tramp files with ivy-remote face
- Highlights non-file-visiting buffers with ivy-subdir face
- Highlight modified buffers with ivy-modified-buffer face
- Disable built-in ivy-switch-buffer transformer (redundant with our own
transformer)
- Mode icons will now fall back to fundamental-mode icon, rather than
the blank file icon (whose irregular width ruins ivy's formatting)
- Fixes project-based buffer name highlighting in switch-to-buffer
- Fixes a void-variable ivy-rich--ivy-switch-buffer-transformer error
Relevant to #1159
Let-binding `ivy-use-virtual-buffers` is neater and more robust than the
previous solution using some copy-pasta. Calling the unwind routine
will become important once counsel is patched to restore buffer-list.
When `+ivy-buffer-preview` is non-nil, our various switch-buffer
functions will preview the current candidate buffer, like how
`counsel-switch-buffer` works.
When `ivy-use-virtual-buffers` is non-nil, virtual buffers are *not*
previewed unless `+ivy-buffer-preview` is `'everything`.
Allow current buffer to be selected when switching other window, so you
can quickly get a second window to the current buffer.
Preselect the most recently selected buffer, so repeated C-x b RET will
switch between your two most recent buffers.
Cause by the expectation that doom-project-root would never return
nil (which was changed to return nil if not in a valid project, due to
an update upstream, in projectile).
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.
+ doom-project-p & doom-project-root are aliases for
projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
consistency, since projectile-project-name and
projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
Color let-functions no longer take format string arguments. e.g.
(format! (red "Hello %s" "world"))
Becomes
(format! (red "Hello %s") "world")
The same goes for print!. Also, doom-ansi-apply now takes two arguments
instead of three.
Also merges doom-message-{fg,bg,fx} into doom-ansi-alist, and reduces
backtrace noise when errors originate from inside these macros.
The same as 7d617f15, but for ivy:
+ Heavily refactored +ivy-file-search
+ Removed -z flag from all engines by default
+ Changed the behavior of the universal argument for from-cwd
interactive commands (e.g. +ivy/rg-from-cwd). It used to enable
recursive searches, but now enables inclusion of hidden and compressed
files in the search instead. *-from-cwd searches are always recursive
now.
+ Now generates +ivy/X and +ivy/X-from-cwd commands dynamically.
+ Split +ivy/project-search into +ivy/project-search-from-cwd.
Universal arguments are passed from these commands to their delegated
engine command.
counsel-projectile-find-file has other capabilities (like actions and
sorting). So we conditionally use projectile-find-file only if the
project is large enough to warrant it.
This occurs when invoking it from the root of massive file trees, like
$HOME or certain non-project folders. It's better that it defer to a
different command altogether (counsel-find-file) if invoked from $HOME,
and counsel-file-jump from anywhere else, which offers approximately
what we want, but at a fraction of the performance cost in those cases.