nvim/lua/custom/lsp/config/jsonls.lua
Simon Lasbrugnas 6efd8a3873
feat: modify LSPs to prefer conform for formatting
Add eslint LSP

feat: Add linter support with 'nvim-lint'

Add linting to JavaScript / TypeScript and Go files
2025-07-28 21:55:38 +02:00

17 lines
450 B
Lua

return {
on_attach = function(_, bufnr)
-- Format document on save
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
callback = function()
-- check that biome lsp is running
local biome = vim.lsp.get_clients({ buffer = bufnr, name = "biome" })
if #biome == 0 then
vim.lsp.buf.format()
else
vim.lsp.buf.format({ filter = function(client) return client.name == "biome" end })
end
end,
})
end
}