diff options
Diffstat (limited to 'lua/lsp')
| -rw-r--r-- | lua/lsp/init.lua | 6 | ||||
| -rw-r--r-- | lua/lsp/null-ls/formatters.lua | 8 | ||||
| -rw-r--r-- | lua/lsp/null-ls/init.lua | 2 | ||||
| -rw-r--r-- | lua/lsp/null-ls/linters.lua | 8 | 
4 files changed, 11 insertions, 13 deletions
| diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 631f142a..94fcf550 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -99,16 +99,14 @@ end  function M.common_on_init(client, bufnr)    if lvim.lsp.on_init_callback then      lvim.lsp.on_init_callback(client, bufnr) -    Log:get_default().info "Called lsp.on_init_callback" +    Log:info "Called lsp.on_init_callback"      return    end    local formatters = lvim.lang[vim.bo.filetype].formatters    if not vim.tbl_isempty(formatters) and formatters[1]["exe"] ~= nil and formatters[1].exe ~= "" then      client.resolved_capabilities.document_formatting = false -    Log:get_default().info( -      string.format("Overriding language server [%s] with format provider [%s]", client.name, formatters[1].exe) -    ) +    Log:info(string.format("Overriding language server [%s] with format provider [%s]", client.name, formatters[1].exe))    end  end 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 diff --git a/lua/lsp/null-ls/init.lua b/lua/lsp/null-ls/init.lua index 8691982e..ce4c07d9 100644 --- a/lua/lsp/null-ls/init.lua +++ b/lua/lsp/null-ls/init.lua @@ -30,7 +30,7 @@ function M.setup(filetype, options)    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/lua/lsp/null-ls/linters.lua b/lua/lsp/null-ls/linters.lua index b449a4f2..70c59974 100644 --- a/lua/lsp/null-ls/linters.lua +++ b/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, options)    options = options 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:info("Using linter:", linter_cmd)          linters[lnt_config.exe] = linter.with { command = linter_cmd, extra_args = lnt_config.args }        end      end | 
