diff options
author | kylo252 <[email protected]> | 2021-08-26 12:49:29 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-26 12:49:29 +0200 |
commit | 5b94e3cee2c4405e98c9c0e8769670723a1f4bae (patch) | |
tree | beb76ee514df69240d6e954b25372412a0316b2a /lua/lsp/null-ls/formatters.lua | |
parent | cfefddde9e9376e68ad8fcad3b1cf8cf139456e6 (diff) |
fix logging when plenary is not available (#1390)
Diffstat (limited to 'lua/lsp/null-ls/formatters.lua')
-rw-r--r-- | lua/lsp/null-ls/formatters.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/lsp/null-ls/formatters.lua b/lua/lsp/null-ls/formatters.lua index cae1fa7d..05e0ec62 100644 --- a/lua/lsp/null-ls/formatters.lua +++ b/lua/lsp/null-ls/formatters.lua @@ -3,7 +3,7 @@ local formatters_by_ft = {} local null_ls = require "null-ls" local services = require "lsp.null-ls.services" -local logger = require("core.log"):get_default() +local Log = require "core.log" local function list_names(formatters, options) options = options or {} @@ -45,15 +45,15 @@ function M.list_configured(formatter_configs) local formatter = null_ls.builtins.formatting[fmt_config.exe] if not formatter then - logger.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 - logger.warn("Not found:", formatter._opts.command) + Log:warn("Not found:", formatter._opts.command) errors[fmt_config.exe] = {} -- Add data here when necessary else - logger.info("Using formatter:", formatter_cmd) + Log:info("Using formatter:", formatter_cmd) formatters[fmt_config.exe] = formatter.with { command = formatter_cmd, extra_args = fmt_config.args } end end |