aboutsummaryrefslogtreecommitdiff
path: root/plugins/spellcheck.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/spellcheck.lua')
-rw-r--r--plugins/spellcheck.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/spellcheck.lua b/plugins/spellcheck.lua
index b0626a9..190087a 100644
--- a/plugins/spellcheck.lua
+++ b/plugins/spellcheck.lua
@@ -7,14 +7,10 @@ local common = require "core.common"
local DocView = require "core.docview"
local Doc = require "core.doc"
-config.plugins.spellcheck = {}
-config.plugins.spellcheck.files = { "%.txt$", "%.md$", "%.markdown$" }
-if PLATFORM == "Windows" then
- config.plugins.spellcheck.dictionary_file = EXEDIR .. "/words.txt"
-else
- config.plugins.spellcheck.dictionary_file = "/usr/share/dict/words"
-end
-
+config.plugins.spellcheck = common.merge({
+ files = { "%.txt$", "%.md$", "%.markdown$" },
+ dictionary_file = (PLATFORM == "Windows" and EXEDIR .. "/words.txt" or "/usr/share/dict/words")
+}, config.plugins.spellcheck)
local last_input_time = 0
local word_pattern = "%a+"