summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/null-ls
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-06 21:53:56 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-06 21:53:56 +0200
commit6a1732982287ef5aff2a6de171192b9e2bb90758 (patch)
tree543f94f80d548b9ed7a9d0daecb08575a01a9a45 /.config/nvim/lua/lsp/null-ls
parentb89e893bfc7b8893dc4c13aa55f627096b32758a (diff)
Updates to nvim from lvim
Diffstat (limited to '.config/nvim/lua/lsp/null-ls')
-rw-r--r--.config/nvim/lua/lsp/null-ls/formatters.lua8
-rw-r--r--.config/nvim/lua/lsp/null-ls/init.lua2
-rw-r--r--.config/nvim/lua/lsp/null-ls/linters.lua8
3 files changed, 9 insertions, 9 deletions
diff --git a/.config/nvim/lua/lsp/null-ls/formatters.lua b/.config/nvim/lua/lsp/null-ls/formatters.lua
index cf62615..651d6f1 100644
--- a/.config/nvim/lua/lsp/null-ls/formatters.lua
+++ b/.config/nvim/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, option)
option = option 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:debug("Using formatter:" .. formatter_cmd)
formatters[fmt_config.exe] = formatter.with {
command = formatter_cmd,
extra_args = fmt_config.args,
diff --git a/.config/nvim/lua/lsp/null-ls/init.lua b/.config/nvim/lua/lsp/null-ls/init.lua
index f2b1042..d12b40a 100644
--- a/.config/nvim/lua/lsp/null-ls/init.lua
+++ b/.config/nvim/lua/lsp/null-ls/init.lua
@@ -30,7 +30,7 @@ function M.setup(filetype, option)
local ok, _ = pcall(require, "null-ls")
if not ok then
- require("core.log"):get_default().error "Missing null-ls dependency"
+ require("core.log"):error "Missing null-ls dependency"
return
end
diff --git a/.config/nvim/lua/lsp/null-ls/linters.lua b/.config/nvim/lua/lsp/null-ls/linters.lua
index a4eaa89..0f6cbc1 100644
--- a/.config/nvim/lua/lsp/null-ls/linters.lua
+++ b/.config/nvim/lua/lsp/null-ls/linters.lua
@@ -3,7 +3,7 @@ local linters_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(linters, option)
option = option or {}
@@ -45,15 +45,15 @@ function M.list_configured(linter_configs)
local linter = null_ls.builtins.diagnostics[lnt_config.exe]
if not linter then
- logger.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
- logger.warn("Not found:", linter._opts.command)
+ Log:warn("Not found: " .. linter._opts.command)
errors[lnt_config.exe] = {} -- Add data here when necessary
else
- logger.info("Using linter:", linter_cmd)
+ Log:debug("Using linter: " .. linter_cmd)
linters[lnt_config.exe] = linter.with {
command = linter_cmd,
extra_args = lnt_config.args,