aboutsummaryrefslogtreecommitdiffstats
path: root/spellcheck.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-08-26 19:11:14 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-08-26 19:11:14 +0200
commitebdd1360935b8c27eae6929042b0386af3e2e43b (patch)
tree12cb3cb2df08bea8c69c8385ceabfc568477584f /spellcheck.lua
parent70128494d0c60a8096cea856a536ce69ed05ed77 (diff)
downloadvis-spellcheck-ebdd1360935b8c27eae6929042b0386af3e2e43b.tar.gz
add the option 'disable_syntax_awareness' to always check the full viewport
Diffstat (limited to 'spellcheck.lua')
-rw-r--r--spellcheck.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index aacdd94..782fe8f 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -24,6 +24,7 @@ end
spellcheck.typo_style = "fore:red"
spellcheck.check_full_viewport = {}
+spellcheck.disable_syntax_awareness = false
spellcheck.check_tokens = {
[vis.lexers.STRING] = true,
@@ -203,7 +204,7 @@ local enable_spellcheck = function()
return
end
- if vis.win.syntax and vis.lexers.load then
+ if not spellcheck.disable_syntax_awareness and vis.win.syntax and vis.lexers.load then
local lexer = vis.lexers.load(vis.win.syntax, nil, true)
if lexer and lexer.lex then
local old_lex_func = lexer.lex