feat(extras.lang): added jenkinsfile support

This commit is contained in:
Moises Morillo 2024-04-12 11:30:43 -05:00
parent bb36f71b77
commit 978b544993
No known key found for this signature in database
GPG key ID: 659919826C427BBB

View file

@ -0,0 +1,58 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed or {}, { "groovy" })
vim.filetype.add({
pattern = {
[".*.Jenkinsfile"] = "groovy",
},
})
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed or {}, { "npm-groovy-lint" })
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
groovyls = {},
},
},
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
groovy = { "npm-groovy-lint" },
},
linters = {
["npm-groovy-lint"] = {
args = { "--failon", "error" },
},
},
},
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
groovy = { "npm_groovy_lint" },
},
formatters = {
npm_groovy_lint = {
command = "npm-groovy-lint",
args = { "--failon", "error", "--format", "$FILENAME" },
cwd = require("conform.util").root_file({ ".git" }),
stdin = false,
},
},
},
},
}