Browse synonyms & definitions from multiple providers as a telescope.nvim extension.
Requirements:
Use your favorite package-manager:
Supported providers:
dictionaryapi
(dictionaryapi.com) — Default, token needed. (Best results)datamuse
(datamuse.com)freedictionaryapi
(dictionaryapi.dev)Register at dictionaryapi.com and get an API key. Set it as
vim.g.dictionary_api_key
or DICTIONARY_API_KEY
environment variable.
To set a different provider, set options from Telescope config. If you're using lazy.nvim, here's an example:
{
'nvim-telescope/telescope.nvim',
opts = {
extensions = {
thesaurus = {
provider = 'datamuse',
},
},
},
}
:Telescope thesaurus lookup
:Telescope thesaurus query word=hello
Bind the lookup command to a key-mapping, e.g.:
vim.keymap.set('n', '<localleader>k', '<cmd>Telescope thesaurus lookup<CR>')
Enjoy!