coward.nvim
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.
Dependencies
Implementation
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.
Installation
On any platform, you can run the provided install.py python script…
coward.nvim
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.
Dependencies
Implementation
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.
Installation
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.py
You 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.
Setup and Configuration
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
CLI usage
You can manually inspect your DB by using
./cowardCLI
Once there, you’ll know your way around. It’s an intuitive CLI tool.
Direct SQLite database manipulation
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.