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:
parent
f36215fb69
commit
3d1858b135
2 changed files with 8 additions and 30 deletions
|
@ -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,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -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 = {},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue