Home

Awesome

Neovim Telescope Thesaurus

Browse synonyms & definitions from multiple providers as a telescope.nvim extension.

Screenshot

Thesaurus screenshot

Install

Requirements:

Use your favorite package-manager:

<details> <summary>With <a href="https://github.com/folke/lazy.nvim">lazy.nvim</a></summary>
{
  'nvim-telescope/telescope.nvim',
  dependencies = { 'rafi/telescope-thesaurus.nvim' },
},
</details> <details> <summary>With <a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a></summary>
use {
  'rafi/telescope-thesaurus.nvim',
  requires = { 'nvim-telescope/telescope.nvim' }
}
</details>

Setup

Supported providers:

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',
      },
    },
  },
}

Usage

Bind the lookup command to a key-mapping, e.g.:

vim.keymap.set('n', '<localleader>k', '<cmd>Telescope thesaurus lookup<CR>')

Enjoy!