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

@ -85,7 +85,7 @@ return {
-- Explicitly enable all mason-managed servers.
-- This is belt-and-suspenders alongside mason-lspconfig's automatic_enable,
-- ensuring servers start regardless of mason-lspconfig version.
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint' })
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss' })
-- hyprls: not managed by mason, enable manually
vim.lsp.config('hyprls', {

View File

@ -32,7 +32,8 @@ return {
-- 'emmet_ls',
'bashls',
'ts_ls',
'eslint-lsp',
'eslint',
'tailwindcss',
},
})

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 })