psliwka / vim-dirtytalk

spellcheck dictionary for programmers πŸ“–
MIT License
136 stars 5 forks source link
neovim spell-check vim

vim-dirtytalk: spellcheck dictionary for programmers πŸ“–

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!

Included word lists

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.

Installation

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

Usage

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!

Customization

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.

Known issues

Contributing

You are encouraged to submit new word lists and other improvements to this project. See CONTRIBUTING for details.

Credits

Created by Piotr Śliwka.

Word lists were created by scraping various external sites and projects, listed below:

Many thanks to authors and contributors of these!

License

MIT