ctrl k
  • init.lua
    ■ ■ ■ ■
    skipped 1 lines
    2 2  require "config.lazy"
    3 3   
    4 4  local function yaml_ft(path, bufnr)
     5 + buf_text = table.concat(vim.api.nvim_buf_get_lines(bufnr, 0, -1, false), "\n")
    5 6   if
    6 7   -- check if file is in roles, tasks, or handlers folder
    7 8   vim.regex("(tasks\\|roles\\|handlers)/"):match_str(path)
    8 9   -- check for known ansible playbook text and if found, return yaml.ansible
    9  - or vim.regex("hosts:\\|tasks:"):match_str(table.concat(vim.api.nvim_buf_get_lines(bufnr, 0, -1, false), "\n"))
     10 + or vim.regex("hosts:\\|tasks:"):match_str(buf_text)
    10 11   then
    11 12   return "yaml.ansible"
     13 + elseif vim.regex("AWSTemplateFormatVersion:"):match_str(buf_text) then
     14 + return "yaml.cfn"
    12 15   else -- return yaml if nothing else
    13 16   return "yaml"
    14 17   end
    skipped 14 lines
  • lua/plugins/conform.lua
    ■ ■ ■ ■ ■ ■
    skipped 107 lines
    108 108   json = "json",
    109 109   jsonc = "json",
    110 110   yaml = "yaml",
     111 + ["yaml.cfn"] = "yaml",
     112 + ["yaml.ansible"] = "yaml",
    111 113   markdown = "markdown",
    112 114   ["markdown.mdx"] = "mdx",
    113 115   graphql = "graphql",
    skipped 23 lines
    137 139   "json",
    138 140   "jsonc",
    139 141   "yaml",
     142 + "yaml.cfn",
    140 143   "markdown",
    141 144   "markdown.mdx",
    142 145   "graphql",
    skipped 7 lines
  • lua/plugins/nvim-lint.lua
    ■ ■ ■ ■ ■
    skipped 5 lines
    6 6   linters_by_ft = {
    7 7   puppet = { "puppet-lint" },
    8 8   sh = { "shellcheck" },
    9  - ["yaml.ansible"] = { "ansible_lint" },
     9 + ansible = { "ansible_lint" },
     10 + cfn = { "cfn_lint" },
     11 + },
     12 + linters = {
     13 + cfn_lint = {
     14 + ignore_exitcode = true,
     15 + },
    10 16   },
    11 17   },
    12 18   config = function(_, opts)
    skipped 44 lines
Please wait...
Page is in error, reload to recover