Compare commits

...

4 commits

Author SHA1 Message Date
jacekpoz
356d512b43
plugins/new-file-template: fix formatting issue 2024-08-08 20:38:55 +02:00
jacekpoz
94ecdca96d
plugins/new-file-template: more doc improvements 2024-08-08 19:08:08 +02:00
jacekpoz
0c748f9991
plugins/new-file-template: more compact docs 2024-08-08 19:01:37 +02:00
jacekpoz
330154e44e
plugins/new-file-template: remove redundant example 2024-08-08 19:00:36 +02:00

View file

@ -1,7 +1,4 @@
{
lib,
...
}: let
{lib, ...}: let
inherit (lib.options) mkOption;
inherit (lib.types) attrsOf bool listOf str;
inherit (lib.nvim.types) mkPluginSetupOption;
@ -12,8 +9,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]
'';
};
@ -33,20 +34,20 @@ 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 {
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 = [\".*\"]; }";
};
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";
};
};
};