Commit graph

49 commits

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

Mentioned in #716
2019-01-23 16:07:09 -05:00
Henrik Lissner
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
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
d02b601dd4
feature/lookup: refactor set-lookup-handlers! docs 2019-01-05 17:04:40 -05:00
Henrik Lissner
9599ca3cf2
feature/lookup: fix missing other-window args
For +lookup/references & +lookup/documentation
2018-10-22 22:16:27 -04:00
Henrik Lissner
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
Henrik Lissner
9337c3f8c3
feature/lookup: fix OTHER-WINDOW arg
For +lookup/definition, +lookup/references and +lookup/documentation.
2018-10-21 17:53:23 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
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
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
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
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
c0251aacee
Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +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
bb88411cc9
General minor refactor & docstring fixes 2018-05-14 20:55:55 +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
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
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
e728e8d04f
feature/lookup: fix docset lookup & setting; add doom-etc-dir/docsets to default paths 2018-03-14 18:47:28 -04:00
Henrik Lissner
f663123f5a
feature/lookup: properly report errors in +lookup/online 2018-01-20 21:44:18 -05:00
Henrik Lissner
1024cfa23c
feature/lookup: fix invalid search engine error in +lookup/online
Caused because map-put returns the full provider cons cell, rather than
just the provider.
2018-01-20 21:43:31 -05:00
Henrik Lissner
392f04446f
General refactor (use map.el more)
+ map-delete is shorter and faster than assq-delete-all
+ map-put is simpler than the delete-then-set workflow
+ map-merge is great for merging default and user settings
2018-01-07 00:15:58 -05:00
Henrik Lissner
48b0a468d1
THOU SHALT NOT WORSHIP FALSE IDOLS, said the byte compiler
And I obeyed.
2018-01-06 04:24:38 -05:00
Henrik Lissner
1371d34149
💥 Replace feature/jump with feature/lookup
+ Adds Dash docset integration (with helm or ivy support)
+ Adds devdocs.io integration
+ Three new settings: :lookup, :devdocs and :docset
2018-01-04 17:11:54 -05:00