Fix loading of dictionaries

This commit is contained in:
Thomas Avé 2022-07-04 16:47:27 +02:00
parent 3a843e806e
commit aa2948fca3
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ end
-- PUBLIC FUNCTIONS
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+")
io.output(file)
for _, line in ipairs(lines) do
@ -20,7 +20,7 @@ M.writeFile = function(type, lang, lines)
end
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 = {}
if M.file_exists(filename) then
local file = io.open(filename, "r")

View File

@ -1 +1,2 @@
Avé
Sint-Pietersvliet