aboutsummaryrefslogtreecommitdiff
path: root/plugins/spellcheck.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2021-12-05 22:56:04 -0500
committerjgmdev <jgmdev@gmail.com>2022-05-22 13:02:00 -0400
commit3fcf065be6387c5bb38a46924f5ea1a7bb17850d (patch)
tree19b3c571c7e1beae325049e56e3df12a0a647637 /plugins/spellcheck.lua
parentc569b3b3697c1656c78ec4b4d233d4ed78fa898a (diff)
downloadlite-xl-plugins-3fcf065be6387c5bb38a46924f5ea1a7bb17850d.tar.gz
lite-xl-plugins-3fcf065be6387c5bb38a46924f5ea1a7bb17850d.zip
Appropriately merged config hashes.
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+"