Thomas 2 سال پیش
والد
کامیت
3e32034cae
1فایلهای تغییر یافته به همراه4 افزوده شده و 11 حذف شده
  1. 4 11
      lua/cspell/code_actions/make_add_to_json.lua

+ 4 - 11
lua/cspell/code_actions/make_add_to_json.lua

@@ -37,17 +37,10 @@ return function(opts)
             local pwd = handle:read("a*")
             handle:close()
             local cspell_dir = os.getenv("HOME") .. "/.config/cspell/"
-            vim.notify("dir " .. cspell_dir, vim.log.levels.INFO)
-
-            -- local cc = os.execute("cd " .. cspell_dir)
-            -- vim.notify("Created a new cspell.json file at " .. cc, vim.log.levels.INFO)
-            local cc = os.execute("git -C " .. cspell_dir .. " add .")
-            vim.notify("add" .. cc, vim.log.levels.INFO)
-            local cc = os.execute("git -C " .. cspell_dir .. " commit -m 'word added'")
-            vim.notify("comm" .. cc, vim.log.levels.INFO)
-            local cc = os.execute("git -C " .. cspell_dir .. " push")
-            vim.notify("push " .. cc, vim.log.levels.INFO)
-            -- os.execute("cd " .. pwd)
+
+            os.execute("git -C " .. cspell_dir .. " add .")
+            os.execute("git -C " .. cspell_dir .. " commit -m 'word added'")
+            os.execute("git -C " .. cspell_dir .. " push")
 
             -- replace word in buffer to trigger cspell to update diagnostics
             h.set_word(opts.diagnostic, opts.word)