Browse Source

fixes condition to use local prettier (#678)

Robin Kautz 4 năm trước cách đây
mục cha
commit
bd9296c4e8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lua/lsp/ts-fmt-lint.lua

+ 1 - 1
lua/lsp/ts-fmt-lint.lua

@@ -10,7 +10,7 @@ M.setup = function()
         formatStdin = true
     }
 
-    if vim.fn.glob("node_modules/.bin/prettier") then
+    if vim.fn.glob("node_modules/.bin/prettier") ~= "" then
         prettier = {
             formatCommand = "./node_modules/.bin/prettier --stdin-filepath ${INPUT}",
             formatStdin = true