diff options
-rw-r--r-- | spellcheck.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spellcheck.lua b/spellcheck.lua index 0c3549d..53e052c 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -45,6 +45,18 @@ spellcheck.check_tokens = { [vis.lexers.DEFAULT] = true, } +function spell_init() + if not vis.communicate then + vis:info('Spellcheck Error: spellchecking support requires vis communicate patch') + return {} + else + local cmd = spellcheck.list_cmd:format(spellcheck.get_lang()) + spellcheck.fd = vis.communicate("spelldaemon", cmd .. " -a") + end +end + +spell_init() + -- Return nil or a string of misspelled word in a specific file range or text -- by calling the spellchecker's list command. -- If given a range we will use vis:pipe to get our typos from the spellchecker. |