diff options
author | Jean-Sébastien Nadeau <mundusnine@gmail.com> | 2020-05-22 10:53:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 10:53:32 -0400 |
commit | 6695b1e41d3f0dd7dfe8c61115dbd5af604d3d4e (patch) | |
tree | b3fcedfd4f03bafd0618fe6bacf4760b4d60b42a /plugins | |
parent | e068564f2455d457d1e60c058cd55668c4bc88e6 (diff) | |
download | lite-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')
-rw-r--r-- | plugins/spellcheck.lua | 8 |
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, }) - |