Commit Graph

96 Commits

Author SHA1 Message Date
ce6e34aff0 completion/ivy: fix +helm/grep* commands
They weren't being defined, since grep is not in
+ivy-project-search-engines.
2018-10-13 13:26:59 -04:00
53fe7a1f04 Refactor Project API to reflect changes upstream
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
2018-09-28 21:13:27 -04:00
2d685d736e completion/ivy: fix +helm--get-command references
Bad copypasta!
2018-09-09 13:44:12 -04:00
22a94fc41a Make helm/ivy project search api more consistent
+{helm,ivy}/*-from-cwd no longer accepts a third DIRECTORY argument.
2018-09-09 09:58:21 -04:00
4d10c28c37 Change doom-ansi-apply, print! & format!
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.
2018-09-09 09:58:20 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
77408ff12f Refactor ivy project search API
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.
2018-08-13 21:47:56 +02:00
ddf107a507 Disable counsel-projectile temporarily #93
Until upstream resolves ericdanan/counsel-projectile#93
2018-08-11 01:59:37 +02:00
87c8f6e18e Temporary fix for counsel-projectile arrayp error
This should be reversed once the issue is fixed upstream.

Addresses #792
2018-08-09 13:00:11 +02:00
685f282b53 completion/ivy: nudge posframe up some
It was too far down on smaller displays
2018-08-07 14:43:27 +02:00
c878314aa6 Refactor +ivy/projectile-find-file to use counsel
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.
2018-08-04 02:28:45 +02:00
3673067736 Fix projectile-find-file locking up Emacs
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.
2018-08-03 16:10:20 +02:00
2f7f8f0868 +ivy/tasks: emit better error if project has no tasks 2018-07-29 19:31:32 +02:00
277915b28c Fix order of +(helm|ivy)-project-search-engines 2018-07-24 14:18:44 +02:00
e865526c75 Add +(helm|ivy)-project-search-engines variables
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.
2018-07-23 00:06:47 +02:00
bb6e9b0a4f Remove counsel-more-chars removal hacks
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.
2018-07-14 02:56:46 +02:00
eb79760c66 ivy-rich-switch-buffer-pad => ivy-rich-pad
To match upstream changes.

Reported by @sarg
2018-07-06 12:17:29 +02:00
2d30d996c3 Refactor counsel-find-file actions
Conform them to naming conventions & only autoload the functions that
aren't used immediately.
2018-07-05 14:05:09 +02:00
a906b82788 add action for counsel-find-file 2018-07-04 23:59:18 +08:00
017ba8d79c Autoload defhydras & use new naming convention
Phasing out the +module@name convention for plain old
+module-name-hydra, which is more compatible with elisp reflection tools
like describe-function and such.

Also, Emacs starts up faster now. Tee hee.
2018-06-26 01:43:54 +02:00
d5bb770ea6 Make +(helm|ivy)-file-search public and autoloaded
So it can be safely used anywhere. Maybe these should be defgenerics?
2018-06-20 18:39:08 +02:00
b72764c6ea fixup! Refactor ivy project-search functionality 2018-06-02 20:31:50 +02:00
7f00221551 Refactor ivy project-search functionality
To prepare for Helm counterpart
2018-06-02 14:34:12 +02:00
55a3aeec9a completion/ivy: don't pre-fill ag/rg/pt/grep searches w/ last search 2018-05-25 00:50:24 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
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.
2018-05-25 00:46:16 +02:00
ded6526eee completion/ivy: fix void-variable error in +ivy:{pt,grep} 2018-05-17 17:00:20 +02:00
dbdce2a8b2 completion/ivy: fix file search not searching compressed archives 2018-05-17 16:59:55 +02:00
317b556bde Extract :ui posframe packages into other modules 2018-05-09 00:20:01 +02:00
f1cf88eeb6 completion/ivy: fix ag/pt/grep file search args 2018-03-28 12:34:04 -07:00
7f6fb69a3d completion/ivy: reuse last query if none supplied 2018-03-26 00:30:10 -04:00
5a746f3da8 completion/ivy: fix wrong number of args error in rg/ag/pt/grep ex commands 2018-03-26 00:29:55 -04:00
9e62898d92 completion/ivy: major refactor of file-search commands 2018-03-26 00:02:22 -04:00
83211cd74c completion/ivy: fix redundant smart-case flag in ripgrep args 2018-03-25 22:59:49 -04:00
2925f5657b completion/ivy: decouple ivy-rich advice from nullable doom--project-root 2018-03-24 17:05:06 -04:00
8d72257aa6 completion/ivy: refactor ag/rg/pt/git-grep advice functions
They are no isolated to their evil use cases.
2018-03-18 22:01:18 -04:00
ff2f30f9b4 feature/evil: improve bf771dcb 2018-03-18 22:01:08 -04:00
bf771dcbdb Set evil jump point before counsel-ag (and variants) 2018-03-18 15:18:19 -04:00
36f903d029 completion/ivy: update for upstream changes (fix ag/rg/pt commands) 2018-02-28 17:57:26 -05:00
52c24197ba completion/ivy: add pt file search backend; fix +ivy:grep-cwd autoload 2018-02-19 20:19:12 -05:00
3bc9f4b4fb completion/ivy: refactor ag/rg file search backends + fix args 2018-02-19 20:18:25 -05:00
20d97ffbaa completion/ivy: add grep/git-grep integration to evil+ivy (:grep/:grepc[wd]) 2018-02-19 03:11:28 -05:00
a8ab37e5eb completion/ivy: fix void-variable errors
In case file search used too early.
2018-01-28 22:24:18 -05:00
233b2021ce completion/ivy: add transformer for projectile-find-file 2018-01-09 03:45:27 -05:00
565c4fa0f4 completion/ivy: fix stringp error from blank buffer-file-name 2018-01-09 03:45:05 -05:00
4b4447d31e completion/ivy: dim non-project entries in counsel-recentf
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.
2018-01-08 19:05:12 -05:00
1f52669684 completion/ivy: refactor switch-buffer transformer #331
Also switches to my private fork of ivy-rich until the changes are
merged upstream.
2018-01-08 19:04:21 -05:00
3beb1f098a completion/ivy: use font-lock-doc-face instead of ivy-remote 2018-01-08 15:02:54 -05:00
f2e5321ce1 feature/ivy: fix virtual buffers in +ivy/switch-workspace-buffer #331
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.
2018-01-08 14:43:58 -05:00
1c2683ce9d completion/ivy: add ivy-rich; rewrite custom transformer #331
+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.
2018-01-08 14:41:41 -05:00
9e3682535a Fix describe-(function|variable) and ivy-resume
describe-(function|variable) weren't remapped to their counsel variants,
so ivy-resume wouldn't resume those sessions properly.
2018-01-06 00:08:53 -05:00