|
|
@@ -33,18 +33,19 @@ return function(opts)
|
|
|
|
|
|
vim.fn.writefile(lines, cspell.path)
|
|
|
|
|
|
- -- replace word in buffer to trigger cspell to update diagnostics
|
|
|
- h.set_word(opts.diagnostic, opts.word)
|
|
|
-
|
|
|
local handle = io.popen("pwd")
|
|
|
local pwd = handle:read("a*")
|
|
|
handle:close()
|
|
|
+
|
|
|
os.execute("cd " .. os.getenv("HOME") .. "/.config/cspell/")
|
|
|
os.execute("git add .")
|
|
|
-
|
|
|
os.execute("git commit -m 'word added'")
|
|
|
os.execute("git push")
|
|
|
- os.execute("cd "..pwd)
|
|
|
+ os.execute("cd " .. pwd)
|
|
|
+
|
|
|
+ -- replace word in buffer to trigger cspell to update diagnostics
|
|
|
+ h.set_word(opts.diagnostic, opts.word)
|
|
|
+
|
|
|
if on_success then
|
|
|
on_success(cspell.path, opts.params, "add_to_json")
|
|
|
end
|