diff options
Diffstat (limited to 'Readme.md')
| -rw-r--r-- | Readme.md | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -2,19 +2,20 @@ A spellchecking lua plugin for the [vis editor](https://github.com/martanne/vis). -## installation +## Installation 1. Download `spellcheck.lua` or clone this repository 2. Load the plugin in your `visrc.lua` with `require(path/to/plugin/spellcheck)` -## usage +## Usage + To enable highlighting of misspelled words press `<Ctrl-w>e` in normal mode. + To disable highlighting press `<Ctrl-w>d` in normal mode. ++ To toggle highlighting press `<F7>` in normal mode. + To correct the word under the cursor press `<Ctrl+w>w` in normal mode. + To ignore the word under the cursor press `<Ctrl+w>i` in normal mode. -## configuration +## Configuration The module table returned from `require(...)` has some configuration options: @@ -24,8 +25,12 @@ The module table returned from `require(...)` has some configuration options: * default: `enchant -l -d %s` * `lang`: The name of the used dictionary. `lang` is inserted in the cmd-strings at `%s`. * default: `$LANG` or `en_US` -* `typo_style`: The style string with which misspellings should be highlighted +* `typo_style`: The style string with which misspellings should be highlighted when using the _full viewport_ method * default: `fore:red` +* `check_tokens`: A table mapping all token names we consider for spellchecking to true + * default: `{[vis.lexers.STRING]=true, [vis.lexers.COMMENT]=true, [vis.lexers.DEFAULT]=true}` +* `disable_syntax_awareness`: Disable the syntax aware spellchecking and use always _full viewport_ + * default: `false` A possible configuration could look like this: |
