| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | local M = {}M.config = function()  O.lang.terraform = {    formatter = {      exe = "terraform",      args = { "fmt" },      stdin = false,    },    lsp = {      path = DATA_PATH .. "/lspinstall/terraform/terraform-ls",    },  }endM.format = function()  O.formatters.filetype["hcl"] = {    function()      return {        exe = O.lang.terraform.formatter.exe,        args = O.lang.terraform.formatter.args,        stdin = O.lang.terraform.formatter.stdin,        tempfile_prefix = ".formatter",      }    end,  }  O.formatters.filetype["tf"] = O.formatters.filetype["hcl"]  require("formatter.config").set_defaults {    logging = false,    filetype = O.formatters.filetype,  }endM.lint = function()  -- TODO: implement linters (if applicable)  return "No linters configured!"endM.lsp = function()  if require("lv-utils").check_lsp_client_active "terraformls" then    return  end  require("lspconfig").terraformls.setup {    cmd = { O.lang.terraform.lsp.path, "serve" },    on_attach = require("lsp").common_on_attach,    filetypes = { "tf", "terraform", "hcl" },  }endM.dap = function()  -- TODO: implement dap  return "No DAP configured!"endreturn M
 |