diff --git a/.config/kak/autoload/spell.kak b/.config/kak/autoload/spell.kak index b5ce4f63..51a8d145 100644 --- a/.config/kak/autoload/spell.kak +++ b/.config/kak/autoload/spell.kak @@ -1,4 +1,3 @@ -# spellcheck using aspell for now (maybe better options?) provide-module spell %~ define-command -override -hidden true nop @@ -8,6 +7,7 @@ provide-module spell %~ define-command -docstring %{ Enable autospell. Autospell refreshes spellchecks and hides spelling in insert mode. } autospell-enable %{ + set-option window autospell_enabled true try %{ spell hook -group auto-spell window ModeChange (push|pop):.*insert %{ @@ -22,6 +22,7 @@ provide-module spell %~ define-command -docstring %{ Disable autospell. Autospell refreshes spellchecks and hides spelling in insert mode. } autospell-disable %{ + set-option window autospell_enabled false try spell-clear remove-hooks window auto-spell } @@ -39,10 +40,9 @@ provide-module spell %~ declare-user-mode spell + map -docstring 'autospell toggle' global spell t ': autospell-toggle' map -docstring 'show spell' global spell s ': spell' - map -docstring 'spell next' global spell n ': spell-next' map -docstring 'spell next' global spell i ': spell-next' - map -docstring 'spell prev' global spell e ': spell-prev' map -docstring 'spell prev' global spell m ': spell-prev' map -docstring 'spell clear' global spell c ': spell-clear' map -docstring 'spell add' global spell a ': spell-add' diff --git a/.config/kak/autoload/ui-mode.kak b/.config/kak/autoload/ui-mode.kak index 40b4acd8..1d6ff742 100644 --- a/.config/kak/autoload/ui-mode.kak +++ b/.config/kak/autoload/ui-mode.kak @@ -67,4 +67,5 @@ define-command autowrap-toggle -docstring "toggle autowrap" %{ } map -docstring 'toggle autowrap' global ui a ": autowrap-toggle" +map -docstring 'toggle autospell' global ui s ": autospell-toggle" ~