Commit graph

122 commits

Author SHA1 Message Date
Henrik Lissner
7fa4e67e39
Minor refactors 2019-12-14 20:42:55 -05:00
Henrik Lissner
a24b750c6c
completion/ivy: fix ivy-re-builders-alist delegates 2019-12-13 22:49:26 -05:00
Henrik Lissner
e4477f02e3
completion/ivy: remove directory in buffer name
When switching buffers.
2019-12-12 15:11:24 -05:00
Henrik Lissner
a66872fe25
Focus on ripgrep; remove ag, git-grep & grep support
We're focusing on ripgrep so we can iterate on search functionality in
Doom quicker. There is nothing the other search backends can do that
ripgrep can't. It is now a hard dependency for Doom.
2019-11-17 01:19:59 -05:00
Henrik Lissner
449ddb986c
Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
Henrik Lissner
bd4755123f
Replace */tasks commands w/ magit-todos-list
If we want ivy/helm interfaces to it, we should use magit-todos as a
backend.
2019-11-15 22:17:31 -05:00
Henrik Lissner
a383293530
Merge pull request #2017 from bennofs/fix-jumplist-empty-buffer
Fix nil error in +ivy/jump-list for empty buffers
2019-11-12 16:19:44 -05:00
Benno Fünfstück
e19c73843d Display empty string instead of magic EMPTY BUFFER 2019-11-11 22:03:48 +01:00
Henrik Lissner
44d5e097c9
shell-command-to-string -> doom-call-process #1887
Minor optimization to remove a layer of indirection when starting
processes.
2019-11-08 16:02:06 -05:00
Benno Fünfstück
31b2a5a19e Fix nil error in +ivy/jump-list for empty buffers
For empty buffers which don't have any lines, `(thing-at-point 'line)`
will return `nil`. This broke `+ivy/jump-list`.
2019-11-04 11:57:52 +01:00
Henrik Lissner
cf21cdc68c
completion/ivy: minor refactor 2019-10-25 20:25:21 -04:00
Henrik Lissner
f79d191701
completion/ivy: use region is active & fix regex quoting
Fixes #1930
2019-10-22 12:36:43 -04:00
Henrik Lissner
45a17c86ba
Add +ivy/jump-list & bind 'SPC b j' to it
Falls back to evil-show-jumps for non-evil users.
2019-10-20 19:57:27 -04:00
Henrik Lissner
cbc7c2aaf0
completion/ivy: remove -S switch
If ivy-case-fold-search == 'auto, counsel-{ag,rg} does this for us.
2019-10-20 10:58:53 -04:00
Henrik Lissner
d5e6c8813e
completion/ivy: use counsel-compile
Wrote wrappers to replace compile and projectile-compile-project.
2019-10-17 01:41:37 -04:00
Henrik Lissner
6ba7c97501
Remove the_platinum_searcher support
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.
2019-10-10 22:02:18 -04:00
Henrik Lissner
e10cd8cf2e
Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
Henrik Lissner
854d8ce00a
Fix (null uniquify-buffer-name-style) errors from ivy
Errors out in Emacs 25.x
2019-07-17 16:14:38 +02:00
Henrik Lissner
750f45328a
Mark helm/ivy search engine autoloads interactive
Otherwise they don't show up in M-x
2019-07-02 23:17:19 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
86ebe08593
Show dirname in ivy-switch-buffer #1506
Makes buffer names more readable in case uniquify-buffer-name-style is
nil (which is necessary to work around a limitation of persp-mode).
2019-06-26 14:28:40 +02:00
Henrik Lissner
0a7221798b
Start file searchs from basic sh/dash shell
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
2019-06-17 15:10:55 +02:00
Henrik Lissner
76143d5a51
Escape pipes in selection for rg project searches
Pipes need to be double-escaped, because they're meaningful to both ivy
and ripgrep, and searches conducted on a selection need to be literal.
2019-06-16 23:04:39 +02:00
Henrik Lissner
6f3c1c6d00
Fix how project search escapes spaces #1487
When invoking project search (via SPC / p) with an active selection.
2019-06-13 09:37:01 +02:00
Henrik Lissner
4ef345fe50
Fix how project search escapes regexps #1486
When invoking project search (via SPC / p) with an active selection, the
selection is captured and escaped, but was escaped incorrectly.
2019-06-12 20:17:47 +02:00
Henrik Lissner
750d7629e1
Fix {git-,}grep backends for project search #1479 2019-06-10 16:04:48 +02:00
Henrik Lissner
fe36bbca1f
Standardize C-c C-e for ivy wgrep
Removes backtab in favor of standardizing C-c C-e. Already used by helm,
wgrep and dired.
2019-05-21 00:30:42 -04:00
Henrik Lissner
d3cb394ce4
Refactor +ivy/tasks
Just realized ivy passes the candidate in its original data structure to
its handlers.
2019-05-19 02:18:26 -04:00
Henrik Lissner
2fa2639d64
Add value column to {describe,helpful}-variable 2019-05-14 10:06:36 -04:00
Andrew Whatson
876e2a250f Fix ivy-switch-buffer virtual buffer support 2019-05-13 23:45:21 +10:00
Andrew Whatson
9cdd5b2f99 Fixes for ivy-switch-buffer icons
Corrects the ivy-switch-buffer transformer to use buffer icons (not file
icons), and fixes alignment issues in the icon display.
2019-04-27 00:14:53 +10:00
Henrik Lissner
0f8baf3f3e
Minor comment tweaks 2019-04-17 11:19:37 -04:00
Andrew Whatson
ee11262aca Fix wrong-number-of-args in project-search-from-cwd 2019-04-17 00:32:35 +10:00
Henrik Lissner
b6611d215f
Fix wrong-num-of-args error on SPC *
Adds QUERY and DIRECTORY args to +{ivy,helm}/project-search
2019-04-14 13:39:30 -04:00
Henrik Lissner
3ef2abfb22
Improve ivy-switch-buffer transformer
- 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)
2019-04-10 19:24:17 -04:00
Henrik Lissner
00bb00649b
Fix #1065: add +ivy-buffer-unreal-face option 2019-04-07 15:55:45 -04:00
Henrik Lissner
e60b44d255
Fix #1311: remove project check in ivy transformer
Also: minor refactor of `cond` fallback blocks
2019-04-07 15:55:45 -04:00
Henrik Lissner
2514b7476e
completion/ivy: refactor transformers
- 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
2019-04-06 01:37:11 -04:00
Henrik Lissner
337c16cb68
Dear byte-compiler, you drive me to drink,
About Emacs Lisp that I have to rethink.
The world could end,
And humanity transcend,
But you'd still be here raising a stink.
2019-04-05 23:52:29 -04:00
Andrew Whatson
09a833338f Fix +ivy-buffer-preview no longer ignoring virtuals
Upstream updated `counsel--switch-buffer-update-fn` to check
`ivy--virtual-buffers` instead of `ivy-use-virtual-buffers`.
2019-03-21 14:37:23 +10:00
Andrew Whatson
0f0b0d720b Tidy up +ivy-buffer-preview functionality
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.
2019-03-08 16:14:19 +10:00
Andrew Whatson
c7a29ca025 Add optional support for switch-buffer previews
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`.
2019-03-07 14:28:56 +10:00
Andrew Whatson
46f7e6c7e6 Improve +ivy/switch-workspace-buffer
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.
2019-03-07 01:18:37 +10:00
Henrik Lissner
4f40e67e28
Better regexp escaping for ivy project search 2019-03-05 01:59:05 -05:00
Andrew Whatson
faa4367636 Improved switch-to-buffer-other-window for ivy 2019-02-25 22:29:41 +10:00
Henrik Lissner
6a03b37dd3
General refactor for comments & docstrings 2019-01-05 15:20:49 -05:00
Henrik Lissner
a89a2aa70c
completion/{helm,ivy}: fix stringp error
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).
2018-12-11 18:59:30 -05:00
Henrik Lissner
c6c3054fbb
completion/ivy: update ivy-rich integration
And remove unused/defunct code. Also fixes a `file-in-directory-p: Wrong
type argument: stringp, nil` error when invoking counsel-recentf.
2018-10-17 14:34:43 -04:00
Henrik Lissner
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
Henrik Lissner
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