mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(extras.lang): added jenkinsfile support
This commit is contained in:
parent
bb36f71b77
commit
978b544993
1 changed files with 58 additions and 0 deletions
58
lua/lazyvim/plugins/extras/lang/jenkinsfile.lua
Normal file
58
lua/lazyvim/plugins/extras/lang/jenkinsfile.lua
Normal 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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue