Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fischerling/vis-spellcheck
Spellcheck plugin for the vis editor
https://github.com/fischerling/vis-spellcheck
lua spellchecker vis-editor
Last synced: about 2 months ago
JSON representation
Spellcheck plugin for the vis editor
- Host: GitHub
- URL: https://github.com/fischerling/vis-spellcheck
- Owner: fischerling
- License: mit
- Created: 2017-04-07T11:11:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-24T12:58:36.000Z (8 months ago)
- Last Synced: 2024-08-07T18:39:25.491Z (5 months ago)
- Topics: lua, spellchecker, vis-editor
- Language: Lua
- Homepage: https://gitlab.com/muhq/vis-spellcheck
- Size: 92.8 KB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# vis-spellcheck
A spellchecking lua plugin for the [vis editor](https://github.com/martanne/vis).
## Installation
1. Download `spellcheck.lua` or clone this repository into your plugin directory
2. Load the plugin in your `visrc.lua` with `require('plugins/vis-spellcheck')`## Usage
+ To enable highlighting of misspelled words press `e` in normal mode.
+ To disable highlighting press `d` in normal mode.
+ To toggle highlighting press `` in normal mode.
+ To correct the word under the cursor press `w` in normal mode.
+ To ignore the word under the cursor press `i` in normal mode.
+ To add the word under the cursor to the user dictionary press 'a' in normal mode.## Configuration
The module table returned from `require(...)` has some configuration options:
* `cmd`: cmd that is passed to popen() and must return word corrections in Ispell format.
* default: `enchant -d %s`
* `list_cmd`: cmd that is passed to `popen()` and must output a list of misspelled words.
* default: `enchant -l -d %s`
* `default_lang`: The name of the used dictionary if the opened file does not specify one. The selected language is inserted in the cmd-strings at `%s`.
* default: `$LANG` or `en_US`
* `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:
spellcheck = require(...)
spellcheck.cmd = "aspell -l %s -a"
spellcheck.list_cmd = "aspell list -l %s -a"
spellcheck.default_lang = "de_DE"Changing language during runtime:
:set spelllang en_US