This (neo)vim plugin is a dynamically updateable spellcheck dictionary, to be
used in conjunction with Vim's native spell checking feature. It is meant to
aid with writing technical documentation (such as project's READMEs, runbooks,
code comments, etc.), by providing you with a list of commonly used
programming-related words, to supplement Vim's built-in English word list. Does
your screen turn all red as soon as you :set spell
on your project's README?
You might want to give vim-dirtytalk a try!
Currently the plugin comes bundled with following word lists, compiled into one big list at installation time:
List name | Example words |
---|---|
acronyms |
API, JSON, PaaS |
algorithms |
quicksort, subtree, memoization |
brands |
GitHub, AdSense, DynamoDB |
comments |
TODO, FIXME, XXX |
cpp |
const, enum, lvalue |
docker |
Dockerfile, cgroups, ENTRYPOINT |
file-extensions |
.js, .yaml, .lua |
git |
submodule, worktree, rebase |
html |
h1, iframe, fieldset |
kubernetes |
ConfigMap, CSIDriver, HorizontalPodAutoscaler |
lorem-ipsum |
Lorem, ipsum, dolor |
nerd-fonts |
๎ , ๎ , ๎ย |
prometheus |
PromQL, Alertmanager, Pushgateway |
python |
docstring, iterable, awaitable |
unix |
SIGTERM, chroot, grep |
versions |
v1, v2, v3 |
You can disable lists you don't want to use. See the customization section for details.
Install the plugin using your favorite plugin manager. Ensure that the
:DirtytalkUpdate
command is executed after install and update. Example for
vim-plug:
Plug 'psliwka/vim-dirtytalk', { 'do': ':DirtytalkUpdate' }
Then include your freshly-compiled programming
dictionary in your spelllang
setting. Example:
set spelllang=en,programming
Alternatively you can do both steps via your plugin manager. Example for lazy.nvim:
{
"psliwka/vim-dirtytalk",
build = ":DirtytalkUpdate",
config = function()
vim.opt.spelllang = { "en", "programming" }
end,
}
Once installed, the plugin integrates seamlessly with Vim's native spell
checking (see :h spell
for details on how to use it). Make sure you've
enabled spell checking with :set spell
!
To disable a word list, add it to g:dirtytalk_blacklist
variable. Example:
let g:dirtytalk_blacklist=['lorem-ipsum']
Remember to re-run :DirtytalkUpdate
after changing the blacklist.
- Nerd fonts symbols are marked as rare words, to exclude them from spell
suggestions (
z=
and friends). This is needed, because otherwise their large amount grinds Vim's spell suggestions algorithm to a halt. As a side effect, all nerd fonts symbols are highlighted withSpellRare
group (but at least not withSpellBad
, as they would if they hadn't been included in the wordlist at all). If it bothers you, you can disable highlighting rare words entirely with:highlight clear SpellRare
as a workaround.
You are encouraged to submit new word lists and other improvements to this project. See CONTRIBUTING for details.
Created by Piotr ลliwka.
Word lists were created by scraping various external sites and projects, listed below:
- Bjarne Stroustrup's homepage
- BusyBox
- Docker
- GNU coreutils
- Kubernetes
- MDN
- Nerd Fonts
- Python
- Simple Icons
- The Open Group Base Specifications
- Wikipedia
- file-extension-list
- vim-polyglot
Many thanks to authors and contributors of these!