fix logging when plenary is not available (#1390)

This commit is contained in:
kylo252 2021-08-26 12:49:29 +02:00 committed by GitHub
parent cfefddde9e
commit 5b94e3cee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 61 additions and 35 deletions

View file

@ -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