Thomas 2 년 전
부모
커밋
455c473437
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      lua/cspell/code_actions/make_add_to_json.lua

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

@@ -36,15 +36,17 @@ return function(opts)
             local handle = io.popen("pwd")
             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 " .. os.getenv("HOME") .. "/.config/cspell/")
+            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 add .")
-vim.notify("add" .. cc, vim.log.levels.INFO)
+            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)
+            vim.notify("comm" .. cc, vim.log.levels.INFO)
             local cc = os.execute("git push")
-vim.notify("push " .. cc, vim.log.levels.INFO)
+            vim.notify("push " .. cc, vim.log.levels.INFO)
             os.execute("cd " .. pwd)
 
             -- replace word in buffer to trigger cspell to update diagnostics