Fix loading of dictionaries
This commit is contained in:
parent
3a843e806e
commit
aa2948fca3
nvim
|
@ -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")
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
Avé
|
||||
Sint-Pietersvliet
|
||||
|
|
Loading…
Reference in New Issue