From b26f51b8c50deb0ed53c8b189462fe56f3882833 Mon Sep 17 00:00:00 2001 From: Roel de Cort Date: Sat, 18 May 2024 00:32:53 +0200 Subject: [PATCH] add filetype detection --- config/default.nix | 1 + config/file_types.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 config/file_types.nix diff --git a/config/default.nix b/config/default.nix index c7dee59..50a444e 100644 --- a/config/default.nix +++ b/config/default.nix @@ -4,6 +4,7 @@ _: { ./settings.nix ./keymaps.nix ./auto_cmds.nix + ./file_types.nix # Themes ./plugins/themes/default.nix diff --git a/config/file_types.nix b/config/file_types.nix new file mode 100644 index 0000000..9209335 --- /dev/null +++ b/config/file_types.nix @@ -0,0 +1,14 @@ +{ + autoGroups = { + filetypes = {}; + }; + + files."ftdetect/terraformft.lua".autoCmd = [ + { + group = "filetypes"; + event = ["BufRead" "BufNewFile"]; + pattern = ["*.tf" " *.tfvars" " *.hcl"]; + command = "set ft=terraform"; + } + ]; +}