add linter and formatting support

This commit is contained in:
Alexander Navarro 2023-09-20 19:58:35 -03:00
parent 400e7eeb5e
commit 2e76dd1cab
6 changed files with 51 additions and 40 deletions

View file

@ -0,0 +1,19 @@
return {
"mfussenegger/nvim-lint",
event = "VeryLazy",
config = function()
require("lint").linters_by_ft = {
javascript = { "eslint_d" },
typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
-- astro = { "eslint_d" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
end,
}