Commit graph

566 commits

Author SHA1 Message Date
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
Henrik Lissner
746d90c330
make-variable-buffer-local -> make-local-variable
It is more correct to use the latter.
2018-06-19 13:49:18 +02:00
Henrik Lissner
6808c46b58
💥 Change set-popup-rule! usage
Now accepts a flat plist of all its former parameters, including new
:parameters and :actions properties to increase your control over the
fate of your windows.

The old usage of set-popup-rule! is deprecated and may not work right!

The :ui popup module has also seen a major refactor to improve
efficiency and load times.

Sorry! This is the last "big" change before 2.1!
2018-06-18 02:34:16 +02:00
Henrik Lissner
97b42c449b
Allow set-company-backend! to unset backends
Passing nil as its second argument will unset previously set backends.
2018-06-17 21:40:32 +02:00
Henrik Lissner
ce86fa0557
helm-swoop: always split below current window 2018-06-17 17:19:33 +02:00
Henrik Lissner
17981d6a61
Conform hook names to conventions
Also minor reformatting & comment corrections.
2018-06-17 02:25:12 +02:00
Henrik Lissner
f8625a62ac
Lazy-load helm-projectile 2018-06-16 15:05:08 +02:00
Henrik Lissner
4122ff4314
Reformat helm package configs 2018-06-16 15:04:27 +02:00
Henrik Lissner
3ad16f660f
Refactor set-company-backend! 2018-06-16 12:46:57 +02:00
Henrik Lissner
44363cae40
General, minor refactor & revision
Across the board. All the boards.
2018-06-16 12:26:58 +02:00
Henrik Lissner
cdcc4eec5d
Refactor +helm*replace-prompt
In case +helm-global-prompt is nil, which will effectively disable this
advice.
2018-06-15 22:10:40 +02:00
Henrik Lissner
f81a0e6f41
Remove redundant def-setting! docstrings
def-setting! will now grab the autodef's docstring if it has an
:obsolete property defined.
2018-06-15 16:54:39 +02:00
Henrik Lissner
eaca8c58fa
Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Henrik Lissner
641425ab77
Fix "failed" error from +helm/ag{,-from-cwd} #644
Only affected Ag backend.
2018-06-05 19:49:34 +02:00
Henrik Lissner
d24807cc2c
Don't overwrite ivy-height for ivy-posframe
This would undo user's customizations to this variable.
2018-06-05 12:04:43 +02:00
Henrik Lissner
1ef581d376
Load company (+auto) on post-self-insert-hook
This is a little later than pre-command-hook, but makes more sense.
Needs more testing though!
2018-06-05 12:04:43 +02:00
Henrik Lissner
cd0e9826ac
Remove company-statistics package
Was a little slow, not terribly helpful and would clash with certain
company backends (like company-lsp).
2018-06-03 23:28:44 +02:00
Henrik Lissner
0018d1c809
Change default company-backends to capf+yasnippet
And list their results separately.
2018-06-03 23:27:06 +02:00
Henrik Lissner
1e81a35461
Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
Henrik Lissner
83590d65ba
Refactor/optimize completion/ido module
Ensure initialization only occurs once when ido is first used. Special
steps are needed because ido is automatically loaded at startup by
Emacs.
2018-06-03 15:01:21 +02:00
Henrik Lissner
6e6dfc2215
Implement helm project search functionality #644
Adds +helm/project-search, as well as +helm/ag and +helm/ag-from-cwd,
and variants for rg, pt and grep/git-grep, to mirror the functionality
available to :completion ivy.

Also updates the evil ex commands and keybinds
2018-06-02 20:37:02 +02:00
Henrik Lissner
b72764c6ea
fixup! Refactor ivy project-search functionality 2018-06-02 20:31:50 +02:00
Henrik Lissner
7f00221551
Refactor ivy project-search functionality
To prepare for Helm counterpart
2018-06-02 14:34:12 +02:00
Henrik Lissner
8aa21517a2
Remap swiper => helm-swoop for helm users #644
Plus remove redundant remappings
2018-06-02 14:01:31 +02:00
Henrik Lissner
80bd587d87
Move :company-backend setting to autoload.el
This decouples the company module from module load-order.
2018-06-01 14:54:13 +02:00
Henrik Lissner
cc159ed9a9
completion/helm: add-hook! => add-hook
add-hook! is unnecessary for adding 1-to-1 hook.
2018-06-01 13:06:30 +02:00
Henrik Lissner
8f673f52fc
Conform helm posframe code to Doom conventions 2018-06-01 13:03:25 +02:00
Henrik Lissner
a3915dfc91
Merge branch 'develop' into helm-posframe 2018-06-01 13:00:23 +02:00
Henrik Lissner
f1bf9d1632
ivy-do-completion-in-region = t #640
Evil ex command completion is now handled by ivy, if it's enabled.
2018-06-01 12:00:57 +02:00
Henrik Lissner
4d9ddf27a9
Fix over-zealous evil-integration in ivy #636 2018-06-01 02:18:46 +02:00
Henrik Lissner
6536637cec
Add +helm--set-prompt-display 2018-05-31 16:16:24 +02:00
Henrik Lissner
5e49239ff2
Give feedback on +company/toggle-auto-completion 2018-05-31 15:59:52 +02:00