aboutsummaryrefslogtreecommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-09-17 11:36:51 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-09-17 11:36:51 +0200
commitaceaf94e4a3de99dd7d626e3eb22065d7bf58617 (patch)
treead69976b0b81db36556af3fdc1fcf070d0532b08 /Readme.md
parent38b8c680cc43c123912b09fe5507aff363e34432 (diff)
parentca3342d1cb7e16501960f4f83b35f3778ec1d6cd (diff)
downloadvis-spellcheck-origin.tar.gz
vis-spellcheck-origin.zip
Merge branch 'syntax_aware' into masterorigin
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/Readme.md b/Readme.md
index 87f27ec..31a06fd 100644
--- a/Readme.md
+++ b/Readme.md
@@ -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: