瀏覽代碼

chore(lsp): notify format request failed once when there is no client (#2697)

CPea 3 年之前
父節點
當前提交
16c0c86284
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lua/lvim/lsp/utils.lua

+ 1 - 1
lua/lvim/lsp/utils.lua

@@ -176,7 +176,7 @@ function M.format(opts)
   end, clients)
   end, clients)
 
 
   if #clients == 0 then
   if #clients == 0 then
-    vim.notify "[LSP] Format request failed, no matching language servers."
+    vim.notify_once "[LSP] Format request failed, no matching language servers."
   end
   end
 
 
   local timeout_ms = opts.timeout_ms or 1000
   local timeout_ms = opts.timeout_ms or 1000