From c7afc0c766a8270e815b11ec4ab3734ef975aa2f Mon Sep 17 00:00:00 2001 From: ppenguin Date: Fri, 16 Jan 2026 15:57:01 +0100 Subject: [PATCH] review mods --- modules/plugins/languages/hcl.nix | 8 ++------ modules/plugins/languages/terraform.nix | 12 ++++-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/modules/plugins/languages/hcl.nix b/modules/plugins/languages/hcl.nix index 567e1630..9e672396 100644 --- a/modules/plugins/languages/hcl.nix +++ b/modules/plugins/languages/hcl.nix @@ -8,7 +8,7 @@ inherit (lib.options) mkEnableOption mkOption; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) bool enum listOf; + inherit (lib.types) enum listOf; inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; @@ -61,11 +61,7 @@ in { }; format = { - enable = mkOption { - type = bool; - default = config.vim.languages.enableFormat; - description = "Enable HCL formatting"; - }; + enable = mkEnableOption "Enable HCL formatting" // {default = config.vim.languages.enableFormat;}; type = mkOption { type = deprecatedSingleOrListOf "vim.language.hcl.format.type" (enum (attrNames formats)); default = defaultFormat; diff --git a/modules/plugins/languages/terraform.nix b/modules/plugins/languages/terraform.nix index 8d3d50a3..0056456a 100644 --- a/modules/plugins/languages/terraform.nix +++ b/modules/plugins/languages/terraform.nix @@ -4,11 +4,11 @@ lib, ... }: let - inherit (builtins) attrNames concatStringsSep; + inherit (builtins) attrNames; inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; inherit (lib.meta) getExe; - inherit (lib.types) bool enum listOf; + inherit (lib.types) enum listOf; inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; @@ -57,16 +57,12 @@ in { servers = mkOption { type = listOf (enum (attrNames servers)); default = defaultServers; - description = "Terraform LSP server to use (one or more of [${concatStringsSep " " (attrNames servers)}])"; + description = "Terraform LSP server to use"; }; }; format = { - enable = mkOption { - type = bool; - default = config.vim.languages.enableFormat; - description = "Enable Terraform formatting"; - }; + enable = mkEnableOption "Enable Terraform formatting" // {default = config.vim.languages.enableFormat;}; type = mkOption { type = deprecatedSingleOrListOf "vim.language.terraform.format.type" (enum (attrNames formats)); default = defaultFormat;