From 6695b1e41d3f0dd7dfe8c61115dbd5af604d3d4e Mon Sep 17 00:00:00 2001 From: Jean-Sébastien Nadeau Date: Fri, 22 May 2020 10:53:32 -0400 Subject: Add default path for words file on windows Path is the exe dir. --- plugins/spellcheck.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/spellcheck.lua') 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, }) - -- cgit v1.2.3