feat(lsp): configure eslint, tailwindcss, tsgo and prettier

This commit is contained in:
2026-02-28 09:47:24 +01:00
parent ccb89aaffa
commit a2521f0e6f
7 changed files with 75 additions and 0 deletions
+24
View File
@@ -174,3 +174,27 @@ vim.api.nvim_create_autocmd("FileType", {
vim.bo.shiftwidth = 2
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"json",
"jsonc",
"markdown",
"html",
"css",
"scss",
"less",
},
callback = function(ev)
vim.keymap.set("n", "<leader>lf", function()
require("util").format({
buf = ev.buf,
cmd = {
"prettier",
"--stdin-filepath",
"%file%",
},
})
end, { buffer = ev.buf })
end,
})