(neovim) add git, yaml, ansible and helm support; minor fixes

This commit is contained in:
Bartek Stalewski 2025-07-25 00:52:15 +02:00
parent 79d83fd921
commit a71684c7f0
No known key found for this signature in database
9 changed files with 49 additions and 14 deletions

View file

@ -0,0 +1,4 @@
return {
"mfussenegger/nvim-ansible",
ft = { "yaml.ansible" },
}

View file

@ -6,14 +6,18 @@ return {
build = ":MasonUpdate",
opts = {
ensure_installed = {
"ansible-language-server",
"ansible-lint",
"lua-language-server",
"markdown-toc",
"markdownlint-cli2",
"marksman",
"shfmt",
"stylua",
"terraform-ls",
"tflint",
"yaml-language-server",
"yamlfix",
"yamllint",
},
},
config = function(_, opts)
@ -54,12 +58,13 @@ return {
markdown = { "markdownlint-cli2" },
terraform = { "terraform_validate" },
tf = { "terraform_validate" },
yaml = { "yamllint" },
}
local markdownlint = require("lint").linters["markdownlint-cli2"]
markdownlint.args = {
"--config",
"/Users/f/.config/nvim-ftpd/linters/global.markdownlint-cli2.yaml",
vim.fn.stdpath("config") .. "/cfg_linters/global.markdownlint-cli2.yaml",
}
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
@ -84,11 +89,12 @@ return {
terraform = { "terraform_fmt" },
tf = { "terraform_fmt" },
zsh = { "shfmt" },
yaml = { "yamlfix" },
},
format_on_save = {
lsp_fallback = true,
async = false,
},
-- format_on_save = {
-- lsp_fallback = true,
-- async = false,
-- },
})
end,
},

View file

@ -7,17 +7,23 @@ return {
ensure_installed = {
"bash",
"diff",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"gotmpl",
"hcl",
"helm",
"json",
"lua",
"markdown",
"markdown_inline",
"markdown",
"python",
"regex",
"terraform",
"vim",
"yaml",
},
highlight = { enable = true },
indent = { enable = true },