Commit Graph

152 Commits

Author SHA1 Message Date
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
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
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
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
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
183ccbb8f1
Merge evil-collection-ivy into completion/ivy
Disables evil-collection-ivy. Another step toward the removal of
evil-collection from Doom.
2018-05-31 13:59:21 +02:00
Henrik Lissner
cf974db0bf
completion/ivy: remove redundant autoloads
Many of these exist in {swiper,counsel,smex}-autoloads already.
2018-05-30 16:05:24 +02:00
Henrik Lissner
a25e2e0c89
completion/ivy: add +fuzzy flag
As mentioned in #626
2018-05-30 16:05:21 +02:00
Henrik Lissner
3b85720c9c
Fix incorrect uses of add-to-list 2018-05-28 12:26:03 +02:00
Henrik Lissner
b36eca2ae7
completion/ivy: ivy-height = 15 2018-05-25 00:50:33 +02:00
Henrik Lissner
55a3aeec9a
completion/ivy: don't pre-fill ag/rg/pt/grep searches w/ last search 2018-05-25 00:50:24 +02:00
Henrik Lissner
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
Henrik Lissner
0b48575c14
Remove def-hydra! macro alias
Causes byte-compilation issues and the alias is unnecessary.
2018-05-24 22:03:19 +02:00
Henrik Lissner
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
ded6526eee
completion/ivy: fix void-variable error in +ivy:{pt,grep} 2018-05-17 17:00:20 +02:00
Henrik Lissner
dbdce2a8b2
completion/ivy: fix file search not searching compressed archives 2018-05-17 16:59:55 +02:00
Henrik Lissner
94f9e43f25
Rewrite :defer semantics
:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where
SYMBOL is a hook and INTEGER is a number of idle seconds before the
package is autoloaded, or just the integer (as per the default behavior
of :defer).

Also fixes an issue where switch-buffer-deffered packages (like
smartparens) wouldn't load.
2018-05-15 10:54:45 +02:00
Henrik Lissner
67dab98859
Improve idempotency of Doom config (in case of reloading) 2018-05-14 20:54:58 +02:00
Henrik Lissner
a631c10d05
Exploit new :defer input|buffer across various modules 2018-05-14 20:45:47 +02:00
Henrik Lissner
6e3f500a39
completion/ivy: ivy-use-selectable-prompt = t
Solves the "I want to enter something new, but it also is a part of
a match" issue. Thanks to @gilbertw1 for letting me know about this.

As such, the C-RET keybind from 310d81ab is no longer necessary
2018-05-14 20:37:13 +02:00
Henrik Lissner
b3f38a8bed
completion/ivy: fix header vars in doctor.el 2018-05-09 10:22:03 +02:00
Henrik Lissner
317b556bde
Extract :ui posframe packages into other modules 2018-05-09 00:20:01 +02:00
Fangrui Song
f1cf88eeb6 completion/ivy: fix ag/pt/grep file search args 2018-03-28 12:34:04 -07:00
Henrik Lissner
7f6fb69a3d
completion/ivy: reuse last query if none supplied 2018-03-26 00:30:10 -04:00
Henrik Lissner
5a746f3da8
completion/ivy: fix wrong number of args error in rg/ag/pt/grep ex commands 2018-03-26 00:29:55 -04:00
Henrik Lissner
9e62898d92
completion/ivy: major refactor of file-search commands 2018-03-26 00:02:22 -04:00
Henrik Lissner
83211cd74c
completion/ivy: fix redundant smart-case flag in ripgrep args 2018-03-25 22:59:49 -04:00
Henrik Lissner
2925f5657b
completion/ivy: decouple ivy-rich advice from nullable doom--project-root 2018-03-24 17:05:06 -04:00
Henrik Lissner
70b49282a3
completion/ivy: add counsel-grep-or-swiper to autoloads 2018-03-24 07:25:01 -04:00
Henrik Lissner
dacf50627c
completion/ivy: don't kill ivy on DEL in empty minibuffer 2018-03-23 02:23:57 -04:00
Henrik Lissner
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
Henrik Lissner
ff2f30f9b4
feature/evil: improve bf771dcb 2018-03-18 22:01:08 -04:00
Henrik Lissner
bf771dcbdb
Set evil jump point before counsel-ag (and variants) 2018-03-18 15:18:19 -04:00
Henrik Lissner
73f397560b
completion/ivy: remove yank-pop remap (doesn't work) 2018-03-14 19:50:03 -04:00
Henrik Lissner
128b11a8bc
Minor style/comment edits 2018-03-02 23:26:55 -05:00
Henrik Lissner
1758008ca5
completion/ivy: remap swiper -> counsel-grep-or-swiper #432 2018-02-28 17:57:31 -05:00
Henrik Lissner
36f903d029
completion/ivy: update for upstream changes (fix ag/rg/pt commands) 2018-02-28 17:57:26 -05:00
Henrik Lissner
52c24197ba
completion/ivy: add pt file search backend; fix +ivy:grep-cwd autoload 2018-02-19 20:19:12 -05:00
Henrik Lissner
3bc9f4b4fb
completion/ivy: refactor ag/rg file search backends + fix args 2018-02-19 20:18:25 -05:00
Henrik Lissner
20d97ffbaa
completion/ivy: add grep/git-grep integration to evil+ivy (:grep/:grepc[wd]) 2018-02-19 03:11:28 -05:00
Henrik Lissner
210a80a74f
completion/ivy: add counsel-org-capture autoload #412 2018-02-07 14:47:33 -05:00
Henrik Lissner
4658d22bf7
completion/ivy: remap org-capture to counsel-org-capture #407 2018-02-06 14:07:27 -05:00
UndeadKernel
f632ec3df1 Add 'counsel-descbinds' to councel defer commands. 2018-01-30 13:13:45 +01:00
Henrik Lissner
272a34da45
completion/ivy: larger ivy-occur popup #375 2018-01-28 22:24:48 -05:00
Henrik Lissner
a8ab37e5eb
completion/ivy: fix void-variable errors
In case file search used too early.
2018-01-28 22:24:18 -05:00
Henrik Lissner
3578d433c2
Integrate counsel-projectile-switch-project & restore file prompt when switching projects 2018-01-28 03:34:18 -05:00
Henrik Lissner
d0cce3cafb
completion/ivy: remove projectile-switch-project remap 2018-01-28 03:13:40 -05:00
Henrik Lissner
d556e1190e
completion/ivy: refactor; lazy-load counsel & counsel-projectile
Counsel loads a number of other packages, like dired, etags, swiper and
some of the eshell library. We're better off lazy-loading it.
2018-01-27 21:41:44 -05:00