feat: remove nvim-lint

I found this plugin caused more issues than solved, so I'm dropping it
in favour of using the ESLint LSP server instead. "EslintFixAll" covers
the majority of my bases it seems.
This commit is contained in:
Devin Haska 2024-07-25 21:49:13 -07:00
parent e21b539a40
commit 24d7d89b34
No known key found for this signature in database
2 changed files with 8 additions and 30 deletions

View file

@ -1,29 +0,0 @@
return {
{
"mfussenegger/nvim-lint",
opts = {
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
linters_by_ft = {
html = { "djlint" },
markdown = { "proselint" },
javascript = { "eslint" },
typescript = { "eslint" },
javascriptreact = { "eslint" },
typescriptreact = { "eslint" },
},
},
config = function(_, opts)
local lint = require("lint")
lint.linters_by_ft = opts.linters_by_ft
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd(opts.events, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
end,
},
}

View file

@ -41,7 +41,14 @@ return {
opts = { opts = {
servers = { servers = {
cssls = {}, cssls = {},
eslint = {}, eslint = {
on_attach = function(_, bufnr)
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
command = "EslintFixAll",
})
end,
},
html = {}, html = {},
lua_ls = {}, lua_ls = {},
taplo = {}, taplo = {},