Thomas 2 tahun lalu
induk
melakukan
715a4000d1
1 mengubah file dengan 8 tambahan dan 4 penghapusan
  1. 8 4
      lua/cspell/code_actions/make_add_to_json.lua

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

@@ -37,10 +37,14 @@ return function(opts)
             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")
+            local cc = os.execute("cd " .. os.getenv("HOME") .. "/.config/cspell/")
+            vim.notify("Created a new cspell.json file at " .. cc, vim.log.levels.INFO)
+            local cc = os.execute("git add .")
+vim.notify("add" .. cc, vim.log.levels.INFO)
+            local cc = os.execute("git commit -m 'word added'")
+vim.notify("comm" .. cc, vim.log.levels.INFO)
+            local cc = os.execute("git push")
+vim.notify("push " .. cc, vim.log.levels.INFO)
             os.execute("cd " .. pwd)
 
             -- replace word in buffer to trigger cspell to update diagnostics