Skip to content

psliwka/vim-dirtytalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

57 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

  • 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 with SpellRare group (but at least not with SpellBad, 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.

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

About

spellcheck dictionary for programmers ๐Ÿ“–

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published