coward.nvim is a neovim plugin for natural language autocompletion built on Rust. It stands for "Crab of Wisdom and Rusted Devotion".
This plugin also offers a CLI tool for manual addition and inspection as well as 370k+ english words from the get-go.
This plugin uses a trie to easily store and access words. This trie is implemented in Rust and, upon loading, accesses a SQLite database where all words are stored. This implementation makes this plugin as fast and bloat-free as possible.
On any platform, you can run the provided install.py python script to setup this plugin and install its binary. The whole procedure would look something like
git clone https://github.com/AshLink95/coward.nvim.git
cd coward.nvim
./install.pyYou will find the file insert_english.txt which I created using the english words repo. That contains all english words. However, You can define the words you want your autocomplete to recognize by adding onto that file. You can even create your own but you have to modify the installation script.
In your nvim-cmp setup, make sure you add {name = 'coward'} to require('cmp').config.sources({...}).
You can setup the maximum items displayed (to 10, for example) by adding the following to your init.lua:
require('coward').setup({ max_items = 10 })Note that this the default
max_itemsis 10
You can manually inspect your DB by using
./cowardCLIOnce there, you'll know your way around. It's an intuitive CLI tool.
Keep in mind that this is a SQLite database. You can directly modify elements of the database and the programs will still function as intended. By default, the database is coward.db in the plugin root.