Compare commits

..

No commits in common. "356d512b437f044ded606987446c5fb2b7f9dd78" and "ef9b08a4621a07d9868804090f1e903299e51a53" have entirely different histories.

View file

@ -1,4 +1,7 @@
{lib, ...}: let {
lib,
...
}: let
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
inherit (lib.types) attrsOf bool listOf str; inherit (lib.types) attrsOf bool listOf str;
inherit (lib.nvim.types) mkPluginSetupOption; inherit (lib.nvim.types) mkPluginSetupOption;
@ -9,12 +12,8 @@ in {
default = false; default = false;
description = '' description = ''
new-file-template.nvim: Automatically insert a template on new files in neovim. new-file-template.nvim: Automatically insert a template on new files in neovim.
::: {.note} To add custom templates add a directory containing `lua/templates/*.lua` to `vim.additionalRuntimePaths`.
For custom templates add a directory containing `lua/templates/*.lua` More documentation on the templates available at https://github.com/otavioschwanck/new-file-template.nvim?tab=readme-ov-file#creating-new-templates
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]
''; '';
}; };
@ -34,20 +33,20 @@ in {
disableFiletype = mkOption { disableFiletype = mkOption {
type = listOf str; type = listOf str;
default = []; default = [];
description = "Disable default templates for specific filetypes"; description = "Disable templates for specific filetypes (only disables default templates, user templates will still work)";
}; };
disableSpecific = mkOption { disableSpecific = mkOption {
type = attrsOf (listOf str); type = attrsOf (listOf str);
default = {}; default = {};
description = "Disable specific regexp for the default templates."; description = "Disable specific regexp for the default templates. Example: { ruby = [ \".*\" ]; }";
example = "{ ruby = [\".*\"]; }"; example = "{ ruby = [\".*\"]; }";
}; };
suffixAsFiletype = mkOption { suffixAsFiletype = mkOption {
type = bool; type = bool;
default = false; 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";
}; };
}; };
}; };