aboutsummaryrefslogtreecommitdiff
path: root/spellcheck.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-05-10 08:50:31 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-05-10 08:50:31 +0200
commit41d2f76bbd4ef98de68b43966d07f3bf37b82b69 (patch)
treea5911b83ee74f957add9b4bff1c5fdbd467fff9f /spellcheck.lua
parent136a0c65537c08c0b745480880333d5b3b945737 (diff)
downloadvis-spellcheck-41d2f76bbd4ef98de68b43966d07f3bf37b82b69.tar.gz
vis-spellcheck-41d2f76bbd4ef98de68b43966d07f3bf37b82b69.zip
improve languauge in comments
Diffstat (limited to 'spellcheck.lua')
-rw-r--r--spellcheck.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index bfa8430..0641b45 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -45,7 +45,7 @@ spellcheck.check_tokens = {
[vis.lexers.DEFAULT] = true,
}
--- Return nil or a string of misspelled word in a specific file range or text
+-- Return nil or a sequence of misspelled words 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.
-- If a string was passed we call the spellchecker ourself and redirect its stdout
@@ -89,7 +89,7 @@ end
local ignored = {}
-- Return an iterator over all not ignored typos and their positions in text.
--- The returned iterator is a self contained statefull iterator function closure.
+-- The returned iterator is a self contained stateful iterator function closure.
-- Which will return the next typo and its start and finish in the text, starting by 1.
local function typo_iter(text, typos, ignored) -- luacheck: ignore ignored
local index = 1
@@ -128,7 +128,7 @@ local function typo_iter(text, typos, ignored) -- luacheck: ignore ignored
local start, finish
-- special case for typos at the beginning of the text
-- Leading typos are not found by our used pattern [%A]typo[%A].
- -- To prevent typos to be skipped if the leading typo accours an
+ -- To prevent typos to be skipped if the leading typo occurs an
-- additional time in the text we need this special case
if index == 1 and text:sub(1, #typo) == typo then
start = 1
@@ -283,7 +283,7 @@ local enable_spellcheck = function()
end
end
- -- fallback check spellcheck the full viewport
+ -- fallback: spellcheck the full viewport
spellcheck.check_full_viewport[vis.win] = true
end