Commit graph

58 commits

Author SHA1 Message Date
Henrik Lissner
e89e3bd15e
Redesign set-docsets! autodef
+ Adds :add/:remove support.
+ Adds conditional docset support through nested vectors
+ Removes support for setting docsets on a minor-mode basis (mostly for
  performance reasons, but now that we have conditional docsets, it's
  unnecessary).
2018-09-09 09:58:18 -04:00
Henrik Lissner
7b2661d6a0
feature/lookup: update +lookup:dash ex command 2018-08-31 03:04:29 +02:00
Henrik Lissner
0cf9d1f2f2
Minor refactor & revision across the board 2018-08-31 02:53:50 +02:00
Henrik Lissner
fd8f8c5108
feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +02:00
Henrik Lissner
a57c0fbede
feature/lookup: remove devdocs support (for now)
devdocs-lookup is broken at the moment. devdocs search is still
available through +lookup/online as a provider however. This may be
reversed later, when (and if) we find a better devdocs backend.
2018-08-28 20:52:27 +02:00
Henrik Lissner
4dfb84211b
feature/lookup: minor refactor 2018-08-22 20:38:16 +02:00
Henrik Lissner
916210d5a8
feature/lookup: silence cl-destructuring-bind errors
In likely case where (bounds-of-thing-at-point 'symbol) returns nil,
cl-destructuring-bind would throw a wrong-number-of-args error we don't
care about.
2018-08-08 23:37:29 +02:00
Wang Hao
1ce3bedbbb fix wrong argument order in usage of alist-get 2018-07-02 11:05:10 +08:00
Henrik Lissner
5a7c8803d9
Remove :when support from after!; add defer-until!
New macro does what the :when keyword did for after!.
2018-06-27 21:29:28 +02:00
Henrik Lissner
f784ed3cbd
Update set-docset! documentation
And remove redundant documentation for obsolete :docset.
2018-06-24 22:23:09 +02:00
Henrik Lissner
14dfc9fad9
Add FIXMEs to def-setting!'s
They will be removed on the 2.1.1 release.
2018-06-24 17:13:23 +02: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
25bc9cfbaf
Fix +lookup/file in non-file-visiting buffers
Throws a stringp error is buffer-file-name is nil.

Reported by @myme
2018-06-22 13:42:47 +02:00
Henrik Lissner
e4cfdc7fcb
Use :when instead of (when ...) block
For loading dash docsets in feature/lookup module.

Fixes 'Cannot find package' load errors during byte-compilation.
2018-06-22 01:49:21 +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
be48751a45
Change unsetting with set-lookup-handlers!
Instead of passing :unset, pass in nil as its second argument.
2018-06-22 01:49:20 +02:00
Henrik Lissner
dbc7b667cf
Simplify set-docset! & add unset capability
Removed :add and :remove capabilities. Now appends the provided docset
to the mode's list of docsets, if one exists.
2018-06-22 01:49:20 +02:00
Henrik Lissner
ad2de8e2e5
Fix set-devdocs! not setting docsets properly
Would use MODES as a key, instead of mode.
2018-06-22 01:49:20 +02:00
Henrik Lissner
17678992e2
Minor, general refactor of lookup autoload library 2018-06-20 18:39:44 +02:00
Henrik Lissner
65b2d5eb28
Update +lookup/(definition|references) docs 2018-06-20 18:39:44 +02:00
Henrik Lissner
099040c523
Add helm support to +lookup defs/refs fallback
Instead of hard-coding counsel+ivy support.
2018-06-20 18:39:44 +02:00
Henrik Lissner
6d020a6305
Change add :unset support to set-lookup-handlers!
And update its documentation.
2018-06-20 18:39:44 +02:00
Henrik Lissner
95b227f9fe
Fix docstring references to old settings 2018-06-19 15:01:25 +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
5e23429309
Fix set-devdocs!
Was not applying to all MODES and was using incorrect variable (docsets
-> docset), causing a void-variable error.
2018-06-16 21:16:24 +02:00
Henrik Lissner
ef90633432
Fix docset lookup & lazyload *-dash
Have to forward declare *-dash-docsets so we can lazy load the *-dash
libraries.

Also fixes a void-variable error because helm-dash-docsets isn't defined
by helm-dash, just used.
2018-06-15 21:42:38 +02:00
Henrik Lissner
c0251aacee
Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
Henrik Lissner
7b1db08ea2
Replace :devdocs with set-devdocs! autodef 2018-06-15 16:20:20 +02:00
Henrik Lissner
b99ab59578
Replace :docset with set-docset! autodef 2018-06-15 16:20:20 +02:00
Henrik Lissner
bc4fb8f18e
Fix helm macro errors due to load order
Some packages (like evil-collection and dumb-jump) use helm macros, but
Doom cannot ensure helm will be installed by the time these packages are
byte-compiled during installation. In fact, the default load order
prevents this.

Rather than imposing hard load order requirements, we just make sure
helm is higher on the packages list, so it gets installed sooner.
2018-06-05 14:08:29 +02:00
Henrik Lissner
de014a817b Move :lookup setting to autoload.el 2018-06-02 18:20:09 +02:00
Henrik Lissner
becc79089e
feature/lookup: fix void-function xref-backend-identifier-at-point error 2018-05-25 19:22:44 +02:00
Henrik Lissner
d7d9da2210
Appease byte-compiler san kun chan sama sensei de gozaru 2018-05-25 11:55:57 +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
bb88411cc9
General minor refactor & docstring fixes 2018-05-14 20:55:55 +02:00
Henrik Lissner
1b6abf47ef
feature/lookup: fix counsel-dash not loading; use eww for docsets 2018-05-14 13:05:03 +02:00
Henrik Lissner
2bbee08105
feature/lookup: new command +lookup/file to replace gf 2018-05-14 13:05:03 +02:00
Henrik Lissner
57f383ef76
General revision of docstrings 2018-05-14 13:05:03 +02:00
Henrik Lissner
7630394210
feature/lookup: replace devdocs packages with devdocs-lookup
Improved search; now downloads index from devdocs.io and lets you
fuzzy-search its listing with ivy/helm.
2018-05-14 13:05:03 +02:00
Henrik Lissner
c05b16ee6f
Minor refactor/reformatting 2018-05-03 18:03:13 +02:00
Henrik Lissner
b92a83752a
feature/lookup: fix :lookup => :documentation setting 2018-04-23 06:06:04 -04:00
Henrik Lissner
7579110534
feature/lookup: fix lookup commands skipping to project text search 2018-04-23 01:19:50 -04:00
Henrik Lissner
6ba9259735
feature/lookup: support multiple lookup functions & minor modes in :lookup 2018-04-22 23:55:49 -04:00
ar1a
6fa8edcb22
update documentation for +lookup/documentation
gh is now K in normal mode
2018-04-03 01:13:06 +08:00
Henrik Lissner
412bf56f45
feature/lookup: make lookup commands add to jump list 2018-03-27 20:11:23 -04:00
Henrik Lissner
d06d4c4dde
feature/lookup: fix some windows not grabbing focus after lookups 2018-03-26 02:52:50 -04:00
Henrik Lissner
641e26431d
feature/lookup: use xref's symbol-at-point function in other lookups 2018-03-26 00:21:54 -04:00
Henrik Lissner
e41212bb7b
feature/lookup: fix +lookup/definition not fetching the correct identifier
Some xref backends have specialized thing-at-point implementations (such
as haskell's dante's xref backend), this fix uses them to fetch the
identifier at point.
2018-03-25 22:36:05 -04:00
Henrik Lissner
844e5191ad
feature/lookup: add rust, scs, gfm, nim & typescript defaults to devdocs 2018-03-14 18:48:10 -04:00