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

+ 5 - 5
lua/cspell/code_actions/make_add_to_json.lua

@@ -36,13 +36,13 @@ return function(opts)
             -- replace word in buffer to trigger cspell to update diagnostics
             h.set_word(opts.diagnostic, opts.word)
 
+            local handle = io.popen("pwd")
+            local cc = handle:read("a*")
+            handle:close()
+            vim.notify(cc, vim.log.levels.WARN)
             if on_success then
                 on_success(cspell.path, opts.params, "add_to_json")
-                local handle = io.popen("pwd")
-                local cc = handle:read("a*")
-                handle:close()
-                vim.notify(cc,vim.log.levels.WARN)
-        require("notifyu")("My super important message: "..cc)
+                require("notifyu")("My super important message: " .. cc)
             end
         end,
     }