Commit graph

71 commits

Author SHA1 Message Date
Justin Davis
5962db9f49 fix(lookup): xref 1.3.0 removed var xref--marker-ring
Xref started many backwards incompatible changes in the name of
performance.  The marker ring no longer exists as a variable.
+lookup--xref-show will silently fail every time.

Switches to using xref-after-jump-hook to test whether xref actually
jumped to a definition. The hook is part of the exposed interface and
should hopefully not change in the near future.

Fix: #5737
2021-11-21 19:04:35 +01:00
Henrik Lissner
8e13bc68c7 fix(lookup): strip text properties from error message
Otherwise the error will display a lot of (albeit harmless) gibberish to
the end user.

Fix: #5652
2021-11-21 16:10:49 +01:00
Henrik Lissner
3bd358dc36 fix(lookup): +lookup/online for vertico users
Would formerly throw wrong-number-of-args errors.
2021-10-18 01:24:28 +02:00
Björn Larsson
b2f27c2b4f
refactor(lookup): move xwidget popup rule (#5598)
Setting the rules explicitly was preventing users from customizing how
xwidget popups should behave, so it was moved to the popup module as a 
global default.
2021-10-10 18:22:13 +02:00
Daanturo
ea10da4459 Fix +lookup/in-docsets's vertico section
Convert the let form to let* to fix `Symbol’s value as variable is void:
sink`.
2021-07-29 08:21:17 +07:00
Henrik Lissner
33b646826b fix(vertico): add counsel-file-jump analogue
Fix 'SPC f F' / 'C-c f F' for vertico users
2021-07-28 12:54:23 -04:00
Henrik Lissner
2d56dd73dc fix(lookup): add vertico support to dash-docs
Close #5298
2021-07-28 12:42:58 -04:00
Itai Y. Efrat
a0eb4e9b65 completion/selectrum -> completion/vertico, part 3
- Rename all functions and variables in the module to reflect the
  namechange (and the irc jump function)
2021-07-25 02:52:04 +03:00
Itai Y. Efrat
24eaa1317c completion/selectrum -> completion/vertico, part 2
- Rename module from `:completion selectrum` to `:completion vertico`
- Rename all files involved
- Do *not* yet rename all the functions, as that messes up git's rename
  detection.
2021-07-25 02:51:15 +03:00
Itai Y. Efrat
1fe0ad318b selectrum: improve :tools lookup integration
- move `consult-xref` stuff to `:tools lookup` where it belongs
- add selectrum functionality where possible, document what's beyond the
  scope of this PR
2021-07-25 02:50:42 +03:00
Henrik Lissner
d79cea2e4c Minor refactors, reformatting, & comment revision 2021-07-11 17:52:08 -04:00
Henrik Lissner
1840ae8a18 Backport VC-aware bug-reference-mode from 28.x
Fixes gf (+lookup/file) on issue/PR references for Emacs 27.x users,
for example:

  #1234
  doom-emacs#1234
  hlissner/doom-emacs#1234
2021-05-16 22:50:03 -04:00
Henrik Lissner
ecdf2b0b08 Fix +lookup/file not opening URLs in browser 2021-04-30 01:07:00 -04:00
Henrik Lissner
259cf83ef1 Enhance FFAP lookup backend
gf (+lookup/file) has been changed to:

+ Use the active selection instead of the filename-at-point when
  searching for a file (as requested in #4942).
+ Pre-fill the FFAP prompt with the thing at point if no obvious
  filepath can be guessed from it (via ffap-alist).
+ Offer to search the current project for the thing-at-point (if
  counsel-file-jump is available).
+ Fall back to a standard ffap prompt if all else fails.

I've also reversed te order of file lookup backends so that our FFAP
backend is treated as a never-failing last resort (also because the
bug-reference backend is known to fail gracefully, so we can trust it to
run first).

Closes #4942
2021-04-29 17:24:40 -04:00
Henrik Lissner
d7de9118e8 Fix #4882: ffap lookup handler triggers twice
Also, fall back to counsel-file-jump before ffap.
2021-04-17 23:26:27 -04:00
Henrik Lissner
5ee8080ca7 Respect dash-docs-browser-func
Formerly, `+lookup/in-docsets` would disregard
dash-docs-browser-func (locally setting it to the value of
`+lookup-open-url-fn`). Now only `+lookup/online` respects
+lookup-open-url-fn and `+lookup/in-docsets` respects
`dash-docs-brwoser-func`.

Closes #4795
2021-04-14 23:31:13 -04:00
Henrik Lissner
d4eb7e31ac Fix #4771: give lsp-find-* precedence over fallbacks
LSP lookup handlers should have the highest precedence, but this wasn't
the case due to a regression in 430d628.
2021-03-27 21:45:19 -04:00
Henrik Lissner
0a9172a8f2 tools/lookup: fall through if xref backend fails
Part 1 to solution for #4739
2021-03-05 20:09:22 -05:00
Henrik Lissner
765b6dcfca
Unset unused markers
In case of overlay leaks.
2020-12-12 15:56:36 -05:00
Henrik Lissner
f02879dd04
Add ffap & bug-reference support to +lookup/file
And disable bug-reference-mode by default. It produces too many false
positives, particularly in web modes where color hexes in strings and
comments are very common. Now that bug-reference support is built into
+lookup/file (on gf), users can use that instead.
2020-10-30 19:09:31 -04:00
Henrik Lissner
8ba2b9eafa
Fix void-function xref--show-defs error
When looking up some xref backends (e.g. tide).
2020-10-15 18:13:42 -04:00
Henrik Lissner
5a80db875c
lang/org: add lookup handlers for src blocks
- Fixes: `set-lookup-handlers!` couldn't define :definition or
  :references handlers in text-mode derivatives.
- Adds: support for evaluating code in jupyter blocks (#2477).
2020-08-06 00:23:09 -04:00
Paul A. Patience
a282730ce9 Fix typos and reword docstrings 2020-07-23 07:35:31 -04:00
Seong Yong-ju
9caf05ffe4 Update :tools/lookup +xwidget support
Remove :tools/lookup +xwidget. Provide
`+lookup-xwidget-webkit-open-url-fn` so that we can manually configure
Xwidget WebKit browser for `+lookup/online` or `+lookup/in-docsets`.
2020-06-24 12:37:56 +09:00
Henrik Lissner
fed0e9365c
Make +lookup/in-docsets respect +lookup-open-url-fn 2020-06-01 19:28:58 -04:00
Seong Yong-ju
d08f2dd888 tools/lookup: Support type definition lookup handlers 2020-05-12 01:06:23 +09:00
Seong Yong-ju
13134726dc tools/lookup: Support implementations lookup handlers 2020-05-12 01:03:52 +09:00
Henrik Lissner
439562e526
Merge pull request #2842 from paulapatience/bugfix/synosaurus-wordnet
tools/lookup: fix synosaurus -> synosaurus-wordnet
2020-04-08 15:36:29 -04:00
Henrik Lissner
b78fc4eb76
Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
Henrik Lissner
fbbc7535ea
Fix #2839: fix xref backend for lookup handlers 2020-04-08 15:30:09 -04:00
Paul A. Patience
1b980c7577 tools/lookup: fix synosaurus -> synosaurus-wordnet
The synosaurus-wordnet--command variable is defined in
synosaurus-wordnet rather than in synosaurus.
2020-04-08 05:00:29 -04:00
Henrik Lissner
eca387d670
Refactor +lookup/file & update :file handlers
+ Removed idris-mode's file handler. It doesn't do what I thought it
  did.
+ Fix markdown-follow-thing-at-point file handler creating empty buffer.
2020-02-06 16:55:28 -05:00
Henrik Lissner
1910453e29
The byte-compiler ate my baby 2020-02-06 16:55:27 -05:00
Henrik Lissner
038e52d709
tools/lookup: add +offline feature
For offline dictionary/thesaurus lookup, using wordnut and synosaurus.
2020-01-25 19:02:01 -05:00
Henrik Lissner
7cf197d8ae
Fix reference to old +lookup-symbol-or-region
Was replaced with doom-thing-at-point-or-region in 27bf3c85b
2020-01-25 19:02:01 -05:00
Henrik Lissner
780100131d
Fix #2346: reference to removed function 2020-01-10 04:22:49 -05:00
Henrik Lissner
27bf3c85b5
Generalize thing-at-point & region functions 2020-01-03 02:39:47 -05:00
Henrik Lissner
8f6161f480
Generalize lookup thing-at-pt fn; fix dict/synonym commands 2020-01-02 21:16:01 -05:00
Henrik Lissner
6938f8b97d
Fix references to old dictionary/thesaurus lookup commands
And pass word explicitly to powerthesaurus.
2020-01-02 20:04:20 -05:00
Henrik Lissner
5fe658e583
Rename synonym/dictionary definition lookup commands 2020-01-02 19:53:49 -05:00
Henrik Lissner
56ef4d8800
Use powerthesaurus-lookup-word-dwim in +lookup/word-synonyms 2020-01-02 19:52:10 -05:00
Henrik Lissner
c57aff9b81
Change how +lookup/online populates initial input
If no selection is active, there is no initial input.
If selection is active, use the selection.

Also remove helm-google package, as the helm functionality is provided
by the core helm package already (and actually works).
2019-12-29 19:24:45 -05:00
Henrik Lissner
d00a0af925
tools/lookup: fix missing libs for dictionary/thesaurus lookup 2019-12-24 21:59:36 -05:00
Henrik Lissner
55f0be7074
tools/lookup: fix definition (on mac) & synonym lookup 2019-12-24 20:48:15 -05:00
Henrik Lissner
b53703d527
General comment revision & reformatting 2019-12-21 15:01:05 -05:00
Henrik Lissner
7742813a06
tools/lookup: add +dictionary feature
For looking up words in dictionaries and thesauruses. Requires internet
connection (for now).
2019-12-20 00:59:51 -05:00
Henrik Lissner
3cefe161fa
tools/lookup: fix +lookup/online 2019-12-16 17:05:11 -05:00
Henrik Lissner
dfb5a0cc54
tools/lookup: add autocompletion for google/duckduckgo providers
For +lookup/online, on `SPC s o`

- Change the signature of `+lookup/online`
- Change format of +lookup-provider-url-alist.
2019-12-15 18:00:43 -05:00
Henrik Lissner
a66872fe25
Focus on ripgrep; remove ag, git-grep & grep support
We're focusing on ripgrep so we can iterate on search functionality in
Doom quicker. There is nothing the other search backends can do that
ripgrep can't. It is now a hard dependency for Doom.
2019-11-17 01:19:59 -05:00
Henrik Lissner
8e394ba3f0
tools/lookup: lazy load dash-docs 2019-11-08 16:02:07 -05:00