From d57817d79b18a2e9aa39db129056be3adf3c8371 Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Thu, 7 Mar 2024 02:59:38 -0800 Subject: [PATCH] feat(lang): add telescope terraform integrations (#2235) * 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 * fix(lang): remove event from terraform telescope extensions --- lua/lazyvim/plugins/extras/lang/terraform.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/terraform.lua b/lua/lazyvim/plugins/extras/lang/terraform.lua index ea7bd5de..d486faaf 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,25 @@ return { }, }, }, + { + "nvim-telescope/telescope.nvim", + dependencies = { + { + "ANGkeith/telescope-terraform-doc.nvim", + config = function() + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform_doc") + end) + end, + }, + { + "cappyzawa/telescope-terraform.nvim", + config = function() + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform") + end) + end, + }, + }, + }, }