Commit graph

348 commits

Author SHA1 Message Date
Henrik Lissner
b180aceaa8
completion/helm: fix 'n refactor +fuzzy flag
Didn't properly disable fuzzy search when +fuzzy flag was absent.
2018-08-04 18:42:38 +02:00
Henrik Lissner
2c956593cf
completion/helm: don't index HOME
Invoke helm-find-files instead
2018-08-04 16:00:11 +02:00
Henrik Lissner
9a3e71731c
completion/ivy: bring back flx 2018-08-04 13:47:19 +02:00
Henrik Lissner
e916a4d6fe
Remove ivy-prescient
Doesn't bring enough to the table, slows down fuzzy searches too much,
and alters the way ivy highlights.
2018-08-04 02:42:32 +02:00
Henrik Lissner
41a641f53b
Disable counsel-projectile-find-file transformer 2018-08-04 02:30:26 +02:00
Henrik Lissner
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
Henrik Lissner
316a9f06b2
completion/company: add company-prescient 2018-08-04 02:14:43 +02:00
Henrik Lissner
1f1f2c3ebf
completion/ivy: fix ivy--regex-fuzzy typos 2018-08-03 21:57:47 +02:00
Henrik Lissner
35b88a597b
Activate ivy-prescient-mode on ivy-mode 2018-08-03 21:40:54 +02:00
Henrik Lissner
ab4052b8dc
Refactor completion/ivy & optimize projectile-find-file
counsel-projectile-find-file fontifies visited files and sorts the
resulting file list from projectile-find-file, adding considerable
overhead. Then, ivy-prescient performs a frecency sort and filter,
adding more overhead.

Altogether, this makes projectile-find-file unusable for larger projects
when fuzzy search is on (and in some extreme cases, when it's off). This
change disables both features specifically for projectile-find-file.

Fixes #774, hopefully
2018-08-03 16:35:42 +02:00
Henrik Lissner
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
Henrik Lissner
0b8f3e29d5
Remove rg/pt ivy-re-builders-alist entries
Both counsel-(rg|pt) identify themselves as counsel-ag, so these extra
entries are necessary.
2018-08-02 03:51:15 +02:00
Henrik Lissner
baf400b736
completion/ivy: add ivy-prescient #774
Better fuzzy support versus flx; hopefully faster. Also brings frecency
sorting to ivy commands.
2018-08-02 01:53:29 +02:00
Henrik Lissner
59bc7653d5
completion/ivy: remove flx #774
flx is much too slow with large lists of candidates (i.e.
counsel-projectile-find-file).
2018-08-02 00:29:26 +02:00
Henrik Lissner
b2b8d5d260
Fix company-backends circular-list error in latex 2018-07-30 13:05:02 +02:00
Henrik Lissner
533cb13a02
Append default backends to buffer-local backends 2018-07-30 12:57:26 +02:00
Henrik Lissner
fb233bd37d
completion/helm: fix evil keybinds in helm
Evil-mode was disabled in the minibuffer due to odd behavior, causing
all helm's evilified keybinds to be inaccessible.
2018-07-30 03:43:43 +02:00
Henrik Lissner
22aeaec399
Refactor how company-backends are set and stored
Company backends are now built from an alist (+company-backend-alist),
which can be manipulated through set-company-backend!. Backends can now
be set to all children of a parent mode (text-mode, prog-mode, etc),
like so:

  (set-company-backend! :derived 'text-mode 'company-dabbrev)

or only for an exact major-mode:

  (set-company-backend! 'markdown-mode 'company-dabbrev-code)

Backends cascade. So combining the two examples above will cause
company-backends in a markdown-buffer (which is derived from text-mode)
to be (company-dabbrev-code company-dabbrev).
2018-07-30 03:43:42 +02:00
Henrik Lissner
2f7f8f0868
+ivy/tasks: emit better error if project has no tasks 2018-07-29 19:31:32 +02:00
Henrik Lissner
c87c2bd5a6
Remove redundant magit-completing-read-function 2018-07-29 17:41:59 +02:00
Henrik Lissner
5aef36951d
Goto file keybind in helm-ag-edit buffers 2018-07-29 17:41:59 +02:00
Henrik Lissner
277915b28c
Fix order of +(helm|ivy)-project-search-engines 2018-07-24 14:18:44 +02:00
Henrik Lissner
a8d41a93c0
Fix helm project search commands
Used ivy variable in helm commands, causing a void-variable error.

Reported by @ar1a
2018-07-24 14:07:13 +02:00
Henrik Lissner
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
Henrik Lissner
4323886b1b
Use ivy fallback display function for swiper et co
As they don't work well with ivy-posframe.
2018-07-14 04:08:17 +02:00
Henrik Lissner
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
Henrik Lissner
9f50ca01a0
Rename amx-save-file: smex-items -> amx-items 2018-07-12 16:45:57 +02:00
Henrik Lissner
eb79760c66
ivy-rich-switch-buffer-pad => ivy-rich-pad
To match upstream changes.

Reported by @sarg
2018-07-06 12:17:29 +02:00
Henrik Lissner
80a3c9bf62
Fix company-box not showing lone candidates
Revert this once sebastiencz/company-box#40 is merged.
2018-07-05 21:45:44 +02:00
Henrik Lissner
dfed54c7ad
Shrink oversized company-box icons
This would cause lines in company-box frames to be too large, making the
last candidate seem cut off by the frame edge.
2018-07-05 21:40:34 +02:00
Henrik Lissner
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
fuxialexander
0df9bae16b don't override original actions 2018-07-05 00:38:41 +08:00
fuxialexander
a906b82788 add action for counsel-find-file 2018-07-04 23:59:18 +08:00
Henrik Lissner
2e29455cb4
Disable company-mode in eshell-mode
It appears to be incompatible with pcomplete, causing random errors and
whitespace insertion at odd times.
2018-06-29 01:51:49 +02:00
Henrik Lissner
4a213e07f8
Fix void-function ivy--matcher-desc
When invoking +ivy-coo-hydra/body

Reported by @fuxialexander
2018-06-27 20:31:56 +02:00
Henrik Lissner
029824b6c1
Update company-box icons
Inspired by @fuxialexander's config
2018-06-27 19:13:54 +02:00
Henrik Lissner
af41e17355
Minor reformatting & docstring tweak 2018-06-26 01:48:15 +02:00
Henrik Lissner
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
Henrik Lissner
afa1fe3fc5
Phase out meta keybinds in helm+evil integration
We want to generally avoid meta. M-RET is an exception, and is commonly
used as an "alternate open" key.
2018-06-25 15:45:24 +02:00
Henrik Lissner
2f63c5fa47
Merge pull request #723 from fuxialexander/fix-ivy-fuzzy
Fix disable ivy fuzzy search in counsel-grep and swiper
2018-06-25 15:02:41 +02:00
Henrik Lissner
106062da0d
Fix ivy posframe
The display function was being set on ivy-display-functions-props. The
correct variable for it is ivy-display-functions-alist.

Reported by randoom in discord.
2018-06-25 14:59:01 +02:00
fuxialexander
6a15db7e00 fix disable ivy fuzzy in swiper and counsel-grep 2018-06-25 14:15:00 +08:00
Henrik Lissner
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
5531d7115a
Fix indentation for many autodef setters 2018-06-22 01:49:21 +02:00
Henrik Lissner
8c5deef5fc
Fix unintern calls (missing second argument) 2018-06-22 01:49:21 +02:00
Henrik Lissner
bc87ccf894
Refactor set-company-backend! & revise docstring 2018-06-22 01:49:19 +02:00
Henrik Lissner
aa4c9744f8
Fix set-company-backends! & update docstring
+ It wasn't preserving insertion order of multiple backends
+ It failed when BACKENDS = nil (supposed to unset mode backends)
+ Use eq/equal as a test-fn conditionally (glorious, glorious premature
  optimization)
2018-06-20 19:44:08 +02:00
Henrik Lissner
898449e374
Add completion/company tests 2018-06-20 19:09:05 +02:00
Henrik Lissner
d7f8a9591e
completion/ivy: replace smex with amx
Faster and maintained.
2018-06-20 18:39:44 +02:00
Henrik Lissner
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