From 5d219a0a7b901f8ea4b1bae826e2f0a7f5fdf0b9 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Fri, 2 Aug 2024 19:08:32 +0200 Subject: [PATCH 1/2] plugins/new-file-template: fix disableSpecific example --- .../plugins/utility/new-file-template/new-file-template.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/plugins/utility/new-file-template/new-file-template.nix b/modules/plugins/utility/new-file-template/new-file-template.nix index 88054ab0..d7314cce 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -36,9 +36,7 @@ in { type = attrsOf (listOf str); default = {}; description = "Disable specific regexp for the default templates. Example: { ruby = [ \".*\" ]; }"; - example = { - ruby = [".*"]; - }; + example = "{ ruby = [\".*\"]; }"; }; suffixAsFiletype = mkOption { From ef9b08a4621a07d9868804090f1e903299e51a53 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Wed, 7 Aug 2024 17:09:04 +0200 Subject: [PATCH 2/2] plugins/new-file-template: improve documentation --- .../plugins/utility/new-file-template/new-file-template.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/plugins/utility/new-file-template/new-file-template.nix b/modules/plugins/utility/new-file-template/new-file-template.nix index d7314cce..6b86a60b 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -10,7 +10,11 @@ in { enable = mkOption { type = bool; default = false; - description = "new-file-template.nvim: Automatically insert a template on new files in neovim. To add custom templates add a directory containing `lua/templates/*.lua` to `vim.additionalRuntimePaths`."; + description = '' + new-file-template.nvim: Automatically insert a template on new files in neovim. + To add custom templates add a directory containing `lua/templates/*.lua` to `vim.additionalRuntimePaths`. + More documentation on the templates available at https://github.com/otavioschwanck/new-file-template.nvim?tab=readme-ov-file#creating-new-templates + ''; }; setupOpts = mkPluginSetupOption "nvim-file-template.nvim" {