tools/lookup: add +offline feature

For offline dictionary/thesaurus lookup, using wordnut and synosaurus.
This commit is contained in:
Henrik Lissner 2020-01-25 16:55:04 -05:00
parent 7cf197d8ae
commit 038e52d709
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 46 additions and 20 deletions

View file

@ -10,6 +10,7 @@
- [[#prerequisites][Prerequisites]]
- [[#macos][MacOS]]
- [[#arch-linux][Arch Linux]]
- [[#nixos][NixOS]]
- [[#features][Features]]
- [[#jump-to-definition][Jump to definition]]
- [[#find-references][Find references]]
@ -32,10 +33,11 @@ up definitions, references and documentation.
+ Documentation lookup for a variety of online sources (like devdocs.io,
stackoverflow or youtube).
+ Integration with Dash.app docsets.
+ Support for online dictionaries and thesauruses.
+ Support for online (and offline) dictionaries and thesauruses.
** Module Flags
+ ~+dictionary~ Enable word definition and thesaurus lookup functionality.
+ ~+offline~ Install and prefer offline dictionary/thesaurus.
+ ~+docsets~ Enable integration with Dash.app docsets.
** Plugins
@ -46,13 +48,13 @@ up definitions, references and documentation.
* Prerequisites
This module has several soft dependencies:
+ ~ripgrep~ as a last-resort fallback for
jump-to-definition/find-references.
+ ~ripgrep~ as a last-resort fallback for jump-to-definition/find-references.
+ ~sqlite3~ for Dash docset support.
+ ~wordnet~ for offline dictionary and thesaurus support.
** MacOS
#+BEGIN_SRC sh
brew install ripgrep
brew install ripgrep wordnet
# An older version of sqlite is included in MacOS. If it causes you problems (and
# folks have reported it will), install it through homebrew:
@ -65,6 +67,16 @@ export PATH="/usr/local/opt/sqlite/bin:$PATH"
** Arch Linux
#+BEGIN_SRC sh
sudo pacman -S sqlite ripgrep
sudo yay -S wordnet-cli
#+END_SRC
** NixOS
#+BEGIN_SRC nix
environment.systemPackages = with pkgs; [
ripgrep
sqlite
wordnet
];
#+END_SRC
* Features