feat(lsp): add html-lsp + update conform config

This commit is contained in:
Simon Lasbrugnas 2025-07-27 03:58:18 +02:00
parent 5dafced30e
commit 6cb047320f
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE
2 changed files with 15 additions and 3 deletions

View file

@ -0,0 +1,11 @@
return {
on_attach = function(_, bufnr)
-- Format document on save
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
callback = function()
vim.lsp.buf.format()
end,
})
end
}

View file

@ -3,8 +3,9 @@ return {
config = function()
require("conform").setup({
formatters_by_ft = {
html = { "biome" },
yaml = { "biome" },
html = { "biome", "html-lsp" },
json = { "biome" },
yaml = { "yamlls" },
javascript = { "biome" },
javascriptreact = { "biome" },
markdown = { "biome" },
@ -19,7 +20,7 @@ return {
formatters = {
biome = {
condition = function()
return vim.loop.fs_realpath("biome.json") ~= nil end,
return vim.uv.fs_realpath("biome.json") ~= nil end,
},
},
})