Commit graph

122 commits

Author SHA1 Message Date
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
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
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
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
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
a8ab37e5eb
completion/ivy: fix void-variable errors
In case file search used too early.
2018-01-28 22:24:18 -05:00
Henrik Lissner
233b2021ce
completion/ivy: add transformer for projectile-find-file 2018-01-09 03:45:27 -05:00
Henrik Lissner
565c4fa0f4
completion/ivy: fix stringp error from blank buffer-file-name 2018-01-09 03:45:05 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
3beb1f098a
completion/ivy: use font-lock-doc-face instead of ivy-remote 2018-01-08 15:02:54 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
c6764e0f24
Fix file search opening files from wrong default-directory 2018-01-04 16:16:45 -05:00
Henrik Lissner
815fc6ef02
Update +ivy*counsel-ag-function b/c of upstream changes 2018-01-04 16:16:44 -05:00
Amos Bird
052cee93db fix ivy.
Due to this commit 4f57b5a9eb
2018-01-04 15:49:18 +08:00
Henrik Lissner
a41f02e6e7
completion/ivy: turn off my "very magic" regex mod
This makes regex consistent between evil-search, ivy, ripgrep and ag.
2017-12-10 14:54:33 -05:00
Henrik Lissner
76a4ae459d
Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
Henrik Lissner
85cfcba8ff
completion/ivy: fix :rgcwd not showing any results 2017-12-08 23:14:12 -05:00
Henrik Lissner
5ce249eaec
Fallback engine detection for +ivy file search 2017-11-05 01:16:36 +01:00
Henrik Lissner
6b9849fd57
Add conditional autoload/compile cookies #229 2017-11-05 01:16:35 +01:00
Henrik Lissner
59f39576de
Don't yank line at point for blank project searches 2017-10-04 18:07:49 +02:00
Henrik Lissner
55b9788351
ivy: fix void-variable counsel--git-grep-dir
Upstream updates replaced counsel--git-grep-dir with counsel--git-dir.
This broke a couple project-search utilities in doom.
2017-09-08 16:58:03 +02:00
Henrik Lissner
d2d71795e5 Merge branch 'develop'
* develop: (64 commits)
  Prepare for v2.0.5
  Temporarily disable doom-themes-visual-bell-config
  Fix neotree always changing root
  Update changelog
  Fix wrong-type-argument error from +org/insert-item
  Make +ivy-buffer-transformer autoloadable
  General refactor & cleanup
  Correct troubleshooting link in README
  org: set org-ellipsis to downward chevron
  Add elfeed-(show|search)-mode to evil-snipe-disabled-modes
  Autoload json library
  Rethink smartparens config #181
  README: expand troubleshooting
  Fix wiki links in README (again)
  Correct intro in README
  Fix wiki links in README
  Prevent private commands from affecting projectile cache
  Remove recentf-filename-handlers fix for projectile-recentf-files
  lang/sh: remove unused setup.sh
  Convert +ivy/switch-buffer to transformers + add mode icons #169
  ...
2017-09-03 23:32:23 +02:00
Henrik Lissner
c7957c9321
Make +ivy-buffer-transformer autoloadable 2017-09-02 20:28:04 +02:00
Henrik Lissner
8e0e4d67b1
Convert +ivy/switch-buffer to transformers + add mode icons #169 2017-08-21 21:54:12 +02:00
Brandon Orther
e07972cffb Gracefully handle +ivy-tasks match errors
When trying to use +ivy-tasks in one of my projects it was failing w/ error:
`(Stack overflow in regexp matcher)`. This was due to ripgrep searching a folder
in the project root containing a minified bootstrap CSS source map file (which
had a `TODO:` in it). Since that file was a single line of text concatenated
together, the regex was getting passed ~540KB of text.

To make it easier to recognize what is causing +ivy-tasks to fail I wrapped the
failing code in `condition-case-unless-debug` and report the error and the file
causing the error using `message!`. So now if there is a failure during the
extraction of task from the search cmd's results it moves onto the next and
alerts the user in separate pop-up.

To avoid including the bootstrap file in the ripgrep search result, I added a
`.ignore` file to the project that tells `rg` to ignore it.

NOTE: I was surprised that this problem file was include in the ivy-tasks search
because I expected the search to respect projectile ignore settings. Respecting
projectile's ignored/unignored files and directories wouldn't be too difficult
considering projectile provides a robust collection of functions to help support
this. Also projectile's `projectile-ag` function is a great reference.
2017-08-15 00:37:24 -07:00
Henrik Lissner
edeea02de3
Refactor +ivy--file-search & +ivy docstrings 2017-07-08 15:03:23 +02:00
Henrik Lissner
ddfcf11819
Remove current buffer from +ivy/switch-buffer #144 2017-07-08 13:42:21 +02:00
Henrik Lissner
32069eefd3
Add sharp-quote to function symbols 2017-07-07 14:44:49 +02:00
Henrik Lissner
0f76a2bc3d
completion/ivy: remove s.el dependency 2017-07-07 14:44:32 +02:00
Henrik Lissner
822c78554f
destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +02:00
Henrik Lissner
9ccffc718e
Fix +ivy/switch-buffer when buffer-list is empty 2017-06-16 02:10:33 +02:00
Henrik Lissner
e7b08082fd
Remove unused/redundant ivy bindings 2017-06-09 19:44:41 +02:00
Henrik Lissner
f65ae53e2e
ivy: remap apropos; load ivy-mode sooner; refactor 2017-06-09 13:38:54 +02:00
Henrik Lissner
102c7df400
Fix #100: void variables in +ivy--get-buffers 2017-06-09 13:16:30 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00