feat(nvim): add extra lua linter: selene

This commit is contained in:
Sergio Laín 2024-03-07 12:35:11 +01:00
parent 2cb33758da
commit 946699f332
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -0,0 +1,26 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "selene" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
opts.linters_by_ft.lua = opts.linters_by_ft.lua or {}
table.insert(opts.linters_by_ft.lua, "selene")
opts.linters = {
selene = {
condition = function(ctx)
return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1]
end,
},
}
return opts
end,
},
}