https://github.com/psliwka/vim-dirtytalk
spellcheck dictionary for programmers π
https://github.com/psliwka/vim-dirtytalk
neovim spell-check vim
Last synced: 8 months ago
JSON representation
spellcheck dictionary for programmers π
- Host: GitHub
- URL: https://github.com/psliwka/vim-dirtytalk
- Owner: psliwka
- License: mit
- Created: 2021-03-04T18:54:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-15T10:06:40.000Z (over 1 year ago)
- Last Synced: 2025-10-12T01:58:54.694Z (8 months ago)
- Topics: neovim, spell-check, vim
- Language: Shell
- Homepage:
- Size: 108 KB
- Stars: 157
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
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]:
```vim
Plug 'psliwka/vim-dirtytalk', { 'do': ':DirtytalkUpdate' }
```
Then include your freshly-compiled `programming` dictionary in your `spelllang`
setting. Example:
```vim
set spelllang=en,programming
```
Alternatively you can do both steps via your plugin manager. Example for
[lazy.nvim]:
```lua
{
"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:
```vim
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](CONTRIBUTING.md) for details.
Credits
-------
Created by [Piotr Εliwka](https://github.com/psliwka).
Word lists were created by scraping various external sites and projects, listed
below:
* [Bjarne Stroustrup's homepage](https://www.stroustrup.com/)
* [BusyBox](https://www.busybox.net/)
* [Docker](https://docker.com)
* [GNU coreutils](https://www.gnu.org/software/coreutils/)
* [Kubernetes](https://kubernetes.io/)
* [MDN](https://developer.mozilla.org/)
* [Nerd Fonts](https://www.nerdfonts.com/)
* [Python](https://www.python.org/)
* [Simple Icons](https://simpleicons.org/)
* [The Open Group Base Specifications](https://pubs.opengroup.org/onlinepubs/9699919799/)
* [Wikipedia](https://en.wikipedia.org)
* [file-extension-list](https://github.com/dyne/file-extension-list)
* [vim-polyglot](https://github.com/sheerun/vim-polyglot)
Many thanks to authors and contributors of these!
License
-------
[MIT](LICENSE)
[vim-plug]: https://github.com/junegunn/vim-plug
[lazy.nvim]: https://github.com/folke/lazy.nvim