Commit Graph

71 Commits

Author SHA1 Message Date
2e8329e6b6 Fix error message with async lookup handlers
Even if they succeeded.

Mentioned in #716
2019-01-23 16:07:09 -05:00
37cb0e178c Make set-lookup-handlers! additive
Consecutive calls to set-lookup-handlers! would redefine *all* lookup
handlers, unsetting unspecified ones, so you were forced to redefine all
handlers, even if you only wanted to change one. No more. Its side
effects are now additive.

Also adds :async handler support, however, due to their nature, they
cannot fall back to other handlers (there's no reliable way to detect
they worked or not).

To get around this, write a blocking wrapper around the old async method
and register it as a non-async handler.
2019-01-08 00:33:38 -05:00
b56639e31b Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
0502b9581e feature/lookup: reformat/revise README 2019-01-05 17:18:13 -05:00
9db39b0242 feature/lookup: remove unused set-docset! alias 2019-01-05 17:14:57 -05:00
d02b601dd4 feature/lookup: refactor set-lookup-handlers! docs 2019-01-05 17:04:40 -05:00
9599ca3cf2 feature/lookup: fix missing other-window args
For +lookup/references & +lookup/documentation
2018-10-22 22:16:27 -04:00
915467cb13 feature/lookup: update dumb-jump integration
dumb-jump-go now returns a results plist, so our cl-letf hack is no
longer necessary.
2018-10-21 17:54:15 -04:00
9337c3f8c3 feature/lookup: fix OTHER-WINDOW arg
For +lookup/definition, +lookup/references and +lookup/documentation.
2018-10-21 17:53:23 -04:00
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
ac63596be8 Fix doom-project-root returning nil if no project
It should return default-directory. A change upstream broke this.
2018-09-22 13:15:12 -04:00
2b5738194e feature/lookup: reduce coupling w/ lookup backends
You can now control exactly what lookup backends are used for the
various lookup commands (definition, references, online and file).

This allows you to disable (or add) backends by manipulating the default
value for these lists with add-hook or remove-hook:

* +lookup-definition-functions
* +lookup-references-functions
* +lookup-documentation-functions
* +lookup-file-functions
2018-09-13 19:15:15 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
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
7b2661d6a0 feature/lookup: update +lookup:dash ex command 2018-08-31 03:04:29 +02:00
0cf9d1f2f2 Minor refactor & revision across the board 2018-08-31 02:53:50 +02:00
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
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
4dfb84211b feature/lookup: minor refactor 2018-08-22 20:38:16 +02:00
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
1ce3bedbbb fix wrong argument order in usage of alist-get 2018-07-02 11:05:10 +08:00
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
f784ed3cbd Update set-docset! documentation
And remove redundant documentation for obsolete :docset.
2018-06-24 22:23:09 +02:00
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
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
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
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
5531d7115a Fix indentation for many autodef setters 2018-06-22 01:49:21 +02:00
8c5deef5fc Fix unintern calls (missing second argument) 2018-06-22 01:49:21 +02:00
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
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
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
17678992e2 Minor, general refactor of lookup autoload library 2018-06-20 18:39:44 +02:00
65b2d5eb28 Update +lookup/(definition|references) docs 2018-06-20 18:39:44 +02:00
099040c523 Add helm support to +lookup defs/refs fallback
Instead of hard-coding counsel+ivy support.
2018-06-20 18:39:44 +02:00
6d020a6305 Change add :unset support to set-lookup-handlers!
And update its documentation.
2018-06-20 18:39:44 +02:00
95b227f9fe Fix docstring references to old settings 2018-06-19 15:01:25 +02:00
17981d6a61 Conform hook names to conventions
Also minor reformatting & comment corrections.
2018-06-17 02:25:12 +02:00
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
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
c0251aacee Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
7b1db08ea2 Replace :devdocs with set-devdocs! autodef 2018-06-15 16:20:20 +02:00
b99ab59578 Replace :docset with set-docset! autodef 2018-06-15 16:20:20 +02:00
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
de014a817b Move :lookup setting to autoload.el 2018-06-02 18:20:09 +02:00
becc79089e feature/lookup: fix void-function xref-backend-identifier-at-point error 2018-05-25 19:22:44 +02:00
d7d9da2210 Appease byte-compiler san kun chan sama sensei de gozaru 2018-05-25 11:55:57 +02:00
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
bb88411cc9 General minor refactor & docstring fixes 2018-05-14 20:55:55 +02:00
1b6abf47ef feature/lookup: fix counsel-dash not loading; use eww for docsets 2018-05-14 13:05:03 +02:00