From 4b1741363b76348b68a684dad8fbf349d0f7acc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D0=B0?= =?UTF-8?q?=D1=80=20=D0=A1=D0=B8=D0=BC=D0=B8=D1=9B?= Date: Mon, 29 Jul 2024 14:31:38 +0100 Subject: [PATCH] Added support for .tofu suffix for OpenTofu With the release of OpenTofu 1.8, support for files with .tofu suffix was added. See: https://github.com/opentofu/opentofu/pull/1738 This change enables terraform-mode for .tofu files, "out of the box". --- terraform-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform-mode.el b/terraform-mode.el index 886338d..15e33bd 100644 --- a/terraform-mode.el +++ b/terraform-mode.el @@ -404,7 +404,7 @@ If the point is not at the heading, call (imenu-add-to-menubar "Terraform")) ;;;###autoload -(add-to-list 'auto-mode-alist '("\\.tf\\(vars\\)?\\'" . terraform-mode)) +(add-to-list 'auto-mode-alist '(".\\(tf\\(vars\\)?\\|tofu\\)'". terraform-mode)) (provide 'terraform-mode)