From 10755ebea16e0591246a81e2dd956cb0f6f060be Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Thu, 21 Dec 2023 12:44:16 -0800 Subject: [PATCH] feat(lang): add telescope terraform integrations Closes #2234 Add telescope integrations for: - https://github.com/ANGkeith/telescope-terraform-doc.nvim - https://github.com/cappyzawa/telescope-terraform.nvim --- lua/lazyvim/plugins/extras/lang/terraform.lua | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/terraform.lua b/lua/lazyvim/plugins/extras/lang/terraform.lua index ea7bd5de..f53e78d0 100644 --- a/lua/lazyvim/plugins/extras/lang/terraform.lua +++ b/lua/lazyvim/plugins/extras/lang/terraform.lua @@ -1,3 +1,5 @@ +local Util = require("lazyvim.util") + vim.api.nvim_create_autocmd("FileType", { pattern = { "hcl", "terraform" }, desc = "terraform/hcl commentstring configuration", @@ -56,4 +58,27 @@ return { }, }, }, + { + "nvim-telescope/telescope.nvim", + dependencies = { + { + "ANGkeith/telescope-terraform-doc.nvim", + event = "VeryLazy", + config = function() + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform_doc") + end) + end, + }, + { + "cappyzawa/telescope-terraform.nvim", + event = "VeryLazy", + config = function() + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform") + end) + end, + }, + }, + }, }