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.
This allows you to control what search engines for project-search
commands (bound to SPC / p) to try, and in what order. If you didn't
want to use ripgrep, for instance, remove 'rg from these variables, or
move it to the end of the list.
Fixes wrong-number-of-args error caused by new counsel-more-chars
implementation upstream.
These hacks removed the hard-coded minimum input length requirement for
counsel-ag and its ilk. The recent counsel update made those
requirements customizable through counsel-more-chars-alist.
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.
In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.
Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.
This gained me a modest ~10% boost in startup speed.
Added +ivy-recentf-transformer to counsel-recentf. Entries that aren't
in the same project as the buffer recentf was opened from will be
slightly dimmed.
The former +ivy/switch-workspace-buffer constructed its own collection
of buffers, so ivy-use-virtual-buffers would have no effect on it. Use
internal-complete-buffer instead and ivy-read will know what to do under
the hood.
+ivy-buffer-transformer does *most* of what ivy-rich does, so lets cut down on
our own code, bring in ivy-rich, and add our customizations on top of it.
This fixes ivy-use-virtual-buffers support, too.
When trying to use +ivy-tasks in one of my projects it was failing w/ error:
`(Stack overflow in regexp matcher)`. This was due to ripgrep searching a folder
in the project root containing a minified bootstrap CSS source map file (which
had a `TODO:` in it). Since that file was a single line of text concatenated
together, the regex was getting passed ~540KB of text.
To make it easier to recognize what is causing +ivy-tasks to fail I wrapped the
failing code in `condition-case-unless-debug` and report the error and the file
causing the error using `message!`. So now if there is a failure during the
extraction of task from the search cmd's results it moves onto the next and
alerts the user in separate pop-up.
To avoid including the bootstrap file in the ripgrep search result, I added a
`.ignore` file to the project that tells `rg` to ignore it.
NOTE: I was surprised that this problem file was include in the ivy-tasks search
because I expected the search to respect projectile ignore settings. Respecting
projectile's ignored/unignored files and directories wouldn't be too difficult
considering projectile provides a robust collection of functions to help support
this. Also projectile's `projectile-ag` function is a great reference.