diff options
author | Lewis Russell <lewis6991@gmail.com> | 2021-12-25 19:36:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-25 12:36:56 -0700 |
commit | e11a44aa224ae59670b992a73bfb029f77a75e76 (patch) | |
tree | 1b1ca5727e9d5d0c2b97eff234cadf949d8954ca /runtime | |
parent | 2ae63161e8934b088a95f5aa5529b67cf6190cdb (diff) | |
download | rneovim-e11a44aa224ae59670b992a73bfb029f77a75e76.tar.gz rneovim-e11a44aa224ae59670b992a73bfb029f77a75e76.tar.bz2 rneovim-e11a44aa224ae59670b992a73bfb029f77a75e76.zip |
feat(lua): add vim.spell (#16620)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/lua.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 630df16e79..97062e5986 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -708,6 +708,38 @@ vim.mpack.decode({str}) *vim.mpack.decode* Decodes (or "unpacks") the msgpack-encoded {str} to a Lua object. ------------------------------------------------------------------------------ +VIM.SPELL *lua-spell* + +vim.spell.check({str}) *vim.spell.check()* + Check {str} for spelling errors. Similar to the Vimscript function + |spellbadword()|. + + Note: The behaviour of this function is dependent on: 'spelllang', + 'spellfile', 'spellcapcheck' and 'spelloptions' which can all be local + to the buffer. Consider calling this with |nvim_buf_call()|. + + Example: > + vim.spell.check("the quik brown fox") + --> + { + {'quik', 'bad', 4} + } +< + + Parameters: ~ + {str} String to spell check. + + Return: ~ + List of tuples with three items: + - The badly spelled word. + - The type of the spelling error: + "bad" spelling mistake + "rare" rare word + "local" word only valid in another region + "caps" word should start with Capital + - The position in {str} where the word begins. + +------------------------------------------------------------------------------ VIM *lua-builtin* vim.api.{func}({...}) *vim.api* |