aboutsummaryrefslogtreecommitdiff
path: root/plugins/spellcheck.lua
diff options
context:
space:
mode:
authorJean-Sébastien Nadeau <mundusnine@gmail.com>2020-05-22 10:53:32 -0400
committerGitHub <noreply@github.com>2020-05-22 10:53:32 -0400
commit6695b1e41d3f0dd7dfe8c61115dbd5af604d3d4e (patch)
treeb3fcedfd4f03bafd0618fe6bacf4760b4d60b42a /plugins/spellcheck.lua
parente068564f2455d457d1e60c058cd55668c4bc88e6 (diff)
downloadlite-xl-plugins-6695b1e41d3f0dd7dfe8c61115dbd5af604d3d4e.tar.gz
lite-xl-plugins-6695b1e41d3f0dd7dfe8c61115dbd5af604d3d4e.zip
Add default path for words file on windows
Path is the exe dir.
Diffstat (limited to 'plugins/spellcheck.lua')
-rw-r--r--plugins/spellcheck.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/spellcheck.lua b/plugins/spellcheck.lua
index 64cd6f3..1f29792 100644
--- a/plugins/spellcheck.lua
+++ b/plugins/spellcheck.lua
@@ -7,7 +7,12 @@ local DocView = require "core.docview"
local Doc = require "core.doc"
config.spellcheck_files = { "%.txt$", "%.md$", "%.markdown$" }
-config.dictionary_file = "/usr/share/dict/words"
+if PLATFORM == "Windows" then
+ config.dictionary_file = EXEDIR .. "/words.txt"
+else
+ config.dictionary_file = "/usr/share/dict/words"
+end
+
local last_input_time = 0
local word_pattern = "%a+"
@@ -172,4 +177,3 @@ command.add("core.docview", {
end,
})
-