fix(lsp): formatter now use new null-ls api function (#2135)

This commit is contained in:
CPea 2022-01-04 15:44:54 +07:00 committed by GitHub
parent 21b41688ee
commit a1557d65de
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ local function select_default_formater(client)
local formatters = require "lvim.lsp.null-ls.formatters"
local client_filetypes = client.config.filetypes or {}
for _, filetype in ipairs(client_filetypes) do
if #vim.tbl_keys(formatters.list_registered_providers(filetype)) > 0 then
if #vim.tbl_keys(formatters.list_registered(filetype)) > 0 then
Log:debug("Formatter overriding detected. Disabling formatting capabilities for " .. client.name)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false