modules/performance: document pathsToLink default

We set the default with "normal" priority, so explicitly list it as
`defaultText`.
This commit is contained in:
Matt Sturgeon 2025-04-26 14:03:58 +01:00
parent 6418cf3414
commit 47f44488ae
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -7,6 +7,39 @@
let
inherit (lib) types;
cfg = config.performance;
pathsToLink = [
# :h rtp
# TODO: "/filetype.lua" # filetypes (:h new-filetype)
"/autoload" # automatically loaded scripts (:h autoload-functions)
"/colors" # color scheme files (:h :colorscheme)
"/compiler" # compiler files (:h :compiler)
"/doc" # documentation (:h write-local-help)
"/ftplugin" # filetype plugins (:h write-filetype-plugin)
"/indent" # indent scripts (:h indent-expression)
"/keymap" # key mapping files (:h mbyte-keymap)
"/lang" # menu translations (:h :menutrans)
"/lsp" # LSP client configurations (:h lsp-config)
"/lua" # Lua plugins (:h lua)
# TODO: "/menu.vim" # GUI menus (:h menu.vim)
"/pack" # packages (:h :packadd)
"/parser" # treesitter syntax parsers (:h treesitter)
"/plugin" # plugin scripts (:h write-plugin)
"/queries" # treesitter queries (:h treesitter)
"/rplugin" # remote-plugin scripts (:h remote-plugin)
"/spell" # spell checking files (:h spell)
"/syntax" # syntax files (:h mysyntaxfile)
"/tutor" # tutorial files (:h :Tutor)
# after
"/after"
# ftdetect
"/ftdetect"
# plenary.nvim
"/data/plenary/filetypes"
];
in
{
options.performance = {
@ -48,6 +81,8 @@ in
pathsToLink = lib.mkOption {
type = with types; listOf str;
default = [ ];
# We set this default below in `config` because we want to use default priority
defaultText = pathsToLink;
example = [ "/data" ];
description = "List of paths to link into a combined plugin pack.";
};
@ -71,39 +106,6 @@ in
pkgs.vimPlugins.plenary-nvim
];
config.performance = {
# Set option value with default priority so that values are appended by default
combinePlugins.pathsToLink = [
# :h rtp
# TODO: "/filetype.lua" # filetypes (:h new-filetype)
"/autoload" # automatically loaded scripts (:h autoload-functions)
"/colors" # color scheme files (:h :colorscheme)
"/compiler" # compiler files (:h :compiler)
"/doc" # documentation (:h write-local-help)
"/ftplugin" # filetype plugins (:h write-filetype-plugin)
"/indent" # indent scripts (:h indent-expression)
"/keymap" # key mapping files (:h mbyte-keymap)
"/lang" # menu translations (:h :menutrans)
"/lsp" # LSP client configurations (:h lsp-config)
"/lua" # Lua plugins (:h lua)
# TODO: "/menu.vim" # GUI menus (:h menu.vim)
"/pack" # packages (:h :packadd)
"/parser" # treesitter syntax parsers (:h treesitter)
"/plugin" # plugin scripts (:h write-plugin)
"/queries" # treesitter queries (:h treesitter)
"/rplugin" # remote-plugin scripts (:h remote-plugin)
"/spell" # spell checking files (:h spell)
"/syntax" # syntax files (:h mysyntaxfile)
"/tutor" # tutorial files (:h :Tutor)
# after
"/after"
# ftdetect
"/ftdetect"
# plenary.nvim
"/data/plenary/filetypes"
];
};
# Set option value with default priority so that values are appended by default
config.performance.combinePlugins = { inherit pathsToLink; };
}