diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-15 16:55:32 +0100 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-07-17 16:25:28 +0100 |
commit | 0ac3c4d6314df5fe40571a83e157a425ab7ce16d (patch) | |
tree | b5aee7b6a624b7ebc324206bd562c13e74459055 /runtime/lua/vim/_meta/spell.lua | |
parent | 3fd504dbec39eeced1bea17d9f3bd06de7f3e4d8 (diff) | |
download | rneovim-0ac3c4d6314df5fe40571a83e157a425ab7ce16d.tar.gz rneovim-0ac3c4d6314df5fe40571a83e157a425ab7ce16d.tar.bz2 rneovim-0ac3c4d6314df5fe40571a83e157a425ab7ce16d.zip |
docs(lua): move function docs to lua files
Diffstat (limited to 'runtime/lua/vim/_meta/spell.lua')
-rw-r--r-- | runtime/lua/vim/_meta/spell.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/spell.lua b/runtime/lua/vim/_meta/spell.lua new file mode 100644 index 0000000000..926c8a686d --- /dev/null +++ b/runtime/lua/vim/_meta/spell.lua @@ -0,0 +1,29 @@ +--- @meta + +--- 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: +--- <pre>lua +--- vim.spell.check("the quik brown fox") +--- -- => +--- -- { +--- -- {'quik', 'bad', 5} +--- -- } +--- </pre> +--- +--- @param str string +--- @return {[1]: string, [2]: string, [3]: string}[] +--- 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. +function vim.spell.check(str) end |