From 330154e44e410cc7a38abfb861bc70879fe61666 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 8 Aug 2024 19:00:36 +0200 Subject: [PATCH 1/4] plugins/new-file-template: remove redundant example --- modules/plugins/utility/new-file-template/new-file-template.nix | 2 +- 1 file changed, 1 insertion(+), 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 6b86a60b..3150c315 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -39,7 +39,7 @@ in { disableSpecific = mkOption { type = attrsOf (listOf str); default = {}; - description = "Disable specific regexp for the default templates. Example: { ruby = [ \".*\" ]; }"; + description = "Disable specific regexp for the default templates."; example = "{ ruby = [\".*\"]; }"; }; From 0c748f999103e98364e919548105ba85129de1d3 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 8 Aug 2024 19:01:37 +0200 Subject: [PATCH 2/4] plugins/new-file-template: more compact docs --- modules/plugins/utility/new-file-template/new-file-template.nix | 2 +- 1 file changed, 1 insertion(+), 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 3150c315..3a77ec1d 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -33,7 +33,7 @@ in { disableFiletype = mkOption { type = listOf str; default = []; - description = "Disable templates for specific filetypes (only disables default templates, user templates will still work)"; + description = "Disable default templates for specific filetypes"; }; disableSpecific = mkOption { From 94ecdca96d25217e35bd799d2312a48663e30fb1 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 8 Aug 2024 19:08:08 +0200 Subject: [PATCH 3/4] plugins/new-file-template: more doc improvements --- .../utility/new-file-template/new-file-template.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 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 3a77ec1d..fddaacb0 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -12,8 +12,12 @@ in { 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`. - More documentation on the templates available at https://github.com/otavioschwanck/new-file-template.nvim?tab=readme-ov-file#creating-new-templates + ::: {.note} + For custom templates add a directory containing `lua/templates/*.lua` + to `vim.additionalRuntimePaths`. + ::: + [custom-template-docs]: https://github.com/otavioschwanck/new-file-template.nvim?tab=readme-ov-file#creating-new-templates + More documentation on the templates available at [custom-template-docs] ''; }; @@ -46,7 +50,7 @@ in { suffixAsFiletype = mkOption { type = bool; default = false; - description = "Use suffix of filename rather than vim.bo.filetype as filetype"; + description = "Use suffix of filename rather than `vim.bo.filetype` as filetype"; }; }; }; From 356d512b437f044ded606987446c5fb2b7f9dd78 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 8 Aug 2024 20:38:55 +0200 Subject: [PATCH 4/4] plugins/new-file-template: fix formatting issue --- .../plugins/utility/new-file-template/new-file-template.nix | 5 +---- 1 file changed, 1 insertion(+), 4 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 fddaacb0..167d2b0b 100644 --- a/modules/plugins/utility/new-file-template/new-file-template.nix +++ b/modules/plugins/utility/new-file-template/new-file-template.nix @@ -1,7 +1,4 @@ -{ - lib, - ... -}: let +{lib, ...}: let inherit (lib.options) mkOption; inherit (lib.types) attrsOf bool listOf str; inherit (lib.nvim.types) mkPluginSetupOption;