update nvim plugins
This commit is contained in:
@ -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', {
|
||||
|
||||
@ -32,7 +32,8 @@ return {
|
||||
-- 'emmet_ls',
|
||||
'bashls',
|
||||
'ts_ls',
|
||||
'eslint-lsp',
|
||||
'eslint',
|
||||
'tailwindcss',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@ -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 })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user