Blink Completion Words

August 6, 2025 ยท View on GitHub

Fuzzy complete words and synonyms using blink-cmp.

blink-cmp-words is an extension for blink-cmp that can be used in two ways:

  1. As a dictionary - provides word completion with definitions and related terms
  2. As a thesaurus - provides synonym completion for finding alternative words

It uses Princeton University's WordNet lexical database to provide words, definitions and lexical relations.

thesaurus-demo.webm

Getting Started

Dependencies

Installation

Using lazy.nvim:

{
	"saghen/blink.cmp",
	dependencies = { "archie-judd/blink-cmp-words" },
	opts = {
		-- ...
		-- Optionally add 'dictionary', or 'thesaurus' to default sources
		sources = {
			default = { "lsp", "path", "lazydev" },
			providers = {

				-- Use the thesaurus source
				thesaurus = {
					name = "blink-cmp-words",
					module = "blink-cmp-words.thesaurus",
					-- All available options
					opts = {
						-- A score offset applied to returned items. 
						-- By default the highest score is 0 (item 1 has a score of -1, item 2 of -2 etc..).
						score_offset = 0,

						-- Default pointers define the lexical relations listed under each definition,
						-- see Pointer Symbols below.
						-- Default is as below ("antonyms", "similar to" and "also see").
						definition_pointers = { "!", "&", "^" },

                        -- The pointers that are considered similar words when using the thesaurus,
                        -- see Pointer Symbols below.
                        -- Default is as below ("similar to", "also see" }
                        similarity_pointers = { "&", "^" },

                        -- The depth of similar words to recurse when collecting synonyms. 1 is similar words, 
                        -- 2 is similar words of similar words, etc. Increasing this may slow results. 
                        similarity_depth = 2,
					},
				},

				-- Use the dictionary source
				dictionary = {
					name = "blink-cmp-words",
					module = "blink-cmp-words.dictionary",
					-- All available options
					opts = {
						-- The number of characters required to trigger completion. 
						-- Set this higher if completion is slow, 3 is default.
						dictionary_search_threshold = 3,

						-- See above
						score_offset = 0,

						-- See above
						definition_pointers = { "!", "&", "^" },
					},
				},
			},

			-- Setup completion by filetype
			per_filetype = {
				text = { "dictionary" },
				markdown = { "thesaurus" },
			},
		},
		-- ...
	},
	-- ...
}

You must specify the exact source module: blink-cmp-words.dictionary or blink-cmp-words.thesaurus, not just blink-cmp-words.

Pointer symbols

A WordNet definition looks like this:

Screenshot From 2025-06-23 19-10-45

Beneath each definition are pointers. A pointer is a lexical relation between words, for example antonyms. You can define which pointers are shown by providing a list of pointer symbols.

See here for more information on pointers. The complete list of pointer symbols is given here:

SymbolMeaning
!Antonym
@Hypernym
@iInstance Hypernym
~Hyponym
^Also see
~iInstance Hyponym
#mMember holonym
#sSubstance holonym
#pPart holonym
%mMember meronym
%sSubstance meronym
%pPart meronym
=Attribute
*Entailment
$Verb Group
+Derivationally related form
;cDomain of synset - TOPIC
-cMember of this domain - TOPIC
;rDomain of synset - REGION
-rMember of this domain - REGION
;uDomain of synset - USAGE
-uMember of this domain - USAGE
>Cause
&Similar to
<Participle of verb
\\Derived from adjective

Acknowledgements

This plugin uses and includes:

  • The fzy-lua library by swarn, licensed under the MIT License.
  • The WordNet 3.0 database, Copyright 2006 by Princeton University. All rights reserved. WordNet is used under the terms of the WordNet License.

For licenses, see: LICENSE.