update nvim plugins

This commit is contained in:
Johannes Knopp
2026-03-28 05:45:35 +01:00
parent 9fbffb7558
commit f16af76867
6 changed files with 51 additions and 9 deletions

View File

@ -33,7 +33,22 @@ return {
local keymap = vim.keymap
local fmt_func = function()
vim.lsp.buf.format({ async = true })
local null_ls_active = false
for _, client in ipairs(vim.lsp.get_clients({ bufnr = 0 })) do
if client.name == "null-ls" then
null_ls_active = true
break
end
end
vim.lsp.buf.format({
async = true,
filter = function(client)
if null_ls_active then
return client.name == "null-ls"
end
return true
end,
})
end
keymap.set('n', '<leader>ii', fmt_func, { noremap = true, silent = true })