mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
feat(lua): add vim.spell (#16620)
This commit is contained in:
@@ -707,6 +707,38 @@ vim.mpack.encode({obj}) *vim.mpack.encode*
|
||||
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*
|
||||
|
||||
|
Reference in New Issue
Block a user