robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
65b40e69ac
master
1--- @meta 2-- This file is NOT generated, edit it directly. 3error ( 'Cannot require a meta file' ) 4 5-- luacheck: no unused args 6 7--- Check {str} for spelling errors. Similar to the Vimscript function 8--- [spellbadword()]. 9--- 10--- Note: The behaviour of this function is dependent on: 'spelllang', 11--- 'spellfile', 'spellcapcheck' and 'spelloptions' which can all be local to 12--- the buffer. Consider calling this with [nvim_buf_call()]. 13--- 14--- Example: 15--- 16--- ```lua 17--- vim.spell.check("the quik brown fox") 18--- -- => 19--- -- { 20--- -- {'quik', 'bad', 5} 21--- -- } 22--- ``` 23--- 24--- @param str string 25--- @return [string, 'bad'|'rare'|'local'|'caps', integer][] 26--- List of tuples with three items: 27--- - The badly spelled word. 28--- - The type of the spelling error: 29--- "bad" spelling mistake 30--- "rare" rare word 31--- "local" word only valid in another region 32--- "caps" word should start with Capital 33--- - The position in {str} where the word begins. 34function vim . spell . check ( str ) end