Skip to content

Commit

Permalink
feat(nvim): add my plugin to validate gitlabCI
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Apr 12, 2024
1 parent 1a60995 commit 3c95459
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nvim/lua/config/autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ vim.api.nvim_create_autocmd("BufReadPost", {
-- desc = "Validate Jenkins files on save",
-- pattern = "*enkinsfile*",
-- })
--
vim.api.nvim_create_augroup("ValidateGitlabCIfiles", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function()
require("validate-gitlab-ci.validate-gitlab-ci").validate()
end,
group = "ValidateGitlabCIfiles",
desc = "Validate Gitlab CI files on save",
pattern = ".gitlab-ci.yml",
})

vim.api.nvim_create_augroup("ConfugureLuaBo", { clear = true })
vim.api.nvim_create_autocmd("BufRead", {
Expand Down
2 changes: 2 additions & 0 deletions nvim/lua/plugins/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ return {

-- Lint Jenkins files
-- { "ckipp01/nvim-jenkinsfile-linter", dependencies = { "nvim-lua/plenary.nvim" }, ft = "groovy" },
-- { dir = "~/git_priv/validate-gitlab-ci.nvim", dependencies = { "nvim-lua/plenary.nvim" }, ft = "yaml" },
{ "sbulav/validate-gitlab-ci.nvim", dependencies = { "nvim-lua/plenary.nvim" } },

-- Encode/decode base64 strings
"sbulav/base64.nvim",
Expand Down

0 comments on commit 3c95459

Please sign in to comment.