kak-spell
PyEnchant wrapper for Kakoune.
Installation
-
Install the C Enchant library, and the required dictionaries. See PyEnchant documentation for details.
-
Install the
kak-spellscript, for instance with pipx:
pipx install kak-spell
- Install plug.kak and add the following lines in your
kakrc:
plug "dmerejkowsky/kak-spell"
- (optional): declare a user mode and some mappings:
plug "dmerejkowsky/kak-spell" config %{
declare-user-mode kak-spell
map global user s ': enter-user-mode -lock kak-spell<ret>' -docstring 'enter spell user mode'
map global kak-spell a ': kak-spell-add<ret>' -docstring 'add the selection to the user dict'
map global kak-spell d ': kak-spell-disable<ret>' -docstring 'clear spelling highlighters'
map global kak-spell e ': kak-spell-enable en_US<ret> :kak-spell <ret>' -docstring 'enable spell check in English'
map global kak-spell f ': kak-spell-enable fr_FR<ret> :kak-spell <ret>' -docstring 'run spell check in French'
map global kak-spell l ': kak-spell-list <ret>' -docstring 'list spelling errors in a buffer'
map global kak-spell n ': kak-spell-next<ret>' -docstring 'go to next spell error'
map global kak-spell p ': kak-spell-previous<ret>' -docstring 'go to next spell error'
map global kak-spell r ': kak-spell-replace<ret>' -docstring 'suggest a list of replacements'
map global kak-spell x ': kak-spell-remove<ret>' -docstring 'remove the selection from the user dict'
}
Note that kak-spell-enable does several things:
- Set a buffer scoped option
kak_spell_langthat is used by other commands - Add a highlighter so that spelling errors are colored with the
Errorface - Adds a
BufWritePosthook to spell check the buffer each time it gets written
The command kak-spell-disable undoes all of the above.
For now, there's no option to disable the hook, or to have it run in response to other events. Please open an issue if this bothers you.
Discuss
You can discuss features of this plugin on discuss.kakoune.com.
I'd like to thank all the people who contributed code and ideas to make usage of this plugin easier.
Metadata
Release files for kak-spell 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kak-spell-0.3.1.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kak_spell-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / kak-spell-0.3.1.tar.gz
| Download URL | kak-spell-0.3.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1317bbefe8be91ea659a948afa4c1c2d67b9393e7b1e9eb5cb7a462e20889f5a
|
|
BLAKE2b-256 checksum How to use checksums |
05160b357c9123deb1f143f6a0c74dc78d534683acff23e99a4d01f5a9a11868
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.2 Linux/5.11.2-arch1-1
|
Release files / kak_spell-0.3.1-py3-none-any.whl
| Download URL | kak_spell-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d89f5093b2c2501ff45be3ad18e488fb075e4cacc060e5d9f2f0c063c864a0a9
|
|
BLAKE2b-256 checksum How to use checksums |
26e522c4fa282f899a4a3b7a19672bf5b0d247a25da82dfbf321da020783c0d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.2 Linux/5.11.2-arch1-1
|