浏览代码

fix the string concat in logging (#1441)

Abouzar Parvan 3 年之前
父节点
当前提交
e9d8d8cd2e
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 3 3
      lua/lsp/null-ls/formatters.lua
  2. 3 3
      lua/lsp/null-ls/linters.lua

+ 3 - 3
lua/lsp/null-ls/formatters.lua

@@ -45,15 +45,15 @@ function M.list_configured(formatter_configs)
     local formatter = null_ls.builtins.formatting[fmt_config.exe]
 
     if not formatter then
-      Log:error("Not a valid formatter:", fmt_config.exe)
+      Log:error("Not a valid formatter: " .. fmt_config.exe)
       errors[fmt_config.exe] = {} -- Add data here when necessary
     else
       local formatter_cmd = services.find_command(formatter._opts.command)
       if not formatter_cmd then
-        Log:warn("Not found:", formatter._opts.command)
+        Log:warn("Not found: " .. formatter._opts.command)
         errors[fmt_config.exe] = {} -- Add data here when necessary
       else
-        Log:debug("Using formatter:", formatter_cmd)
+        Log:debug("Using formatter: " .. formatter_cmd)
         formatters[fmt_config.exe] = formatter.with { command = formatter_cmd, extra_args = fmt_config.args }
       end
     end

+ 3 - 3
lua/lsp/null-ls/linters.lua

@@ -45,15 +45,15 @@ function M.list_configured(linter_configs)
     local linter = null_ls.builtins.diagnostics[lnt_config.exe]
 
     if not linter then
-      Log:error("Not a valid linter:", lnt_config.exe)
+      Log:error("Not a valid linter: " .. lnt_config.exe)
       errors[lnt_config.exe] = {} -- Add data here when necessary
     else
       local linter_cmd = services.find_command(linter._opts.command)
       if not linter_cmd then
-        Log:warn("Not found:", linter._opts.command)
+        Log:warn("Not found: " .. linter._opts.command)
         errors[lnt_config.exe] = {} -- Add data here when necessary
       else
-        Log:debug("Using linter:", linter_cmd)
+        Log:debug("Using linter: " .. linter_cmd)
         linters[lnt_config.exe] = linter.with { command = linter_cmd, extra_args = lnt_config.args }
       end
     end