summaryrefslogtreecommitdiff
path: root/lua/lang/terraform.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lang/terraform.lua')
-rw-r--r--lua/lang/terraform.lua57
1 files changed, 0 insertions, 57 deletions
diff --git a/lua/lang/terraform.lua b/lua/lang/terraform.lua
deleted file mode 100644
index df8ac692..00000000
--- a/lua/lang/terraform.lua
+++ /dev/null
@@ -1,57 +0,0 @@
-local M = {}
-
-M.config = function()
- O.lang.terraform = {
- formatter = {
- exe = "terraform",
- args = { "fmt" },
- stdin = false,
- },
- lsp = {
- path = DATA_PATH .. "/lspinstall/terraform/terraform-ls",
- },
- }
-end
-
-M.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,
- }
-end
-
-M.lint = function()
- -- TODO: implement linters (if applicable)
- return "No linters configured!"
-end
-
-M.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" },
- }
-end
-
-M.dap = function()
- -- TODO: implement dap
- return "No DAP configured!"
-end
-
-return M