Fix loading of dictionaries
This commit is contained in:
parent
3a843e806e
commit
aa2948fca3
|
@ -10,7 +10,7 @@ end
|
||||||
-- PUBLIC FUNCTIONS
|
-- PUBLIC FUNCTIONS
|
||||||
|
|
||||||
M.writeFile = function(type, lang, lines)
|
M.writeFile = function(type, lang, lines)
|
||||||
local filename = "/home/user/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
local filename = vim.fn.getenv("HOME") .. "/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||||
local file = io.open(filename, "a+")
|
local file = io.open(filename, "a+")
|
||||||
io.output(file)
|
io.output(file)
|
||||||
for _, line in ipairs(lines) do
|
for _, line in ipairs(lines) do
|
||||||
|
@ -20,7 +20,7 @@ M.writeFile = function(type, lang, lines)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.readFile = function(type, lang)
|
M.readFile = function(type, lang)
|
||||||
local filename = "/home/user/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
local filename = vim.fn.getenv("HOME") .. "/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||||
local lines = {}
|
local lines = {}
|
||||||
if M.file_exists(filename) then
|
if M.file_exists(filename) then
|
||||||
local file = io.open(filename, "r")
|
local file = io.open(filename, "r")
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Avé
|
Avé
|
||||||
|
Sint-Pietersvliet
|
||||||
|
|
Loading…
Reference in New Issue