style: lua annotations and handle deprecated methods

This commit is contained in:
Folke Lemaitre 2023-10-08 10:45:38 +02:00
parent 21ee35f710
commit 6b837e9165
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 20 additions and 13 deletions

View file

@ -82,7 +82,7 @@ function M.get_formatters(bufnr)
}
---@type lsp.Client[]
local clients = vim.lsp.get_active_clients({ bufnr = bufnr })
local clients = require("lazyvim.util").get_clients({ bufnr = bufnr })
for _, client in ipairs(clients) do
if M.supports_format(client) then
if (#null_ls > 0 and client.name == "null-ls") or #null_ls == 0 then