Skip to content

Commit 47f4448

Browse files
committed
modules/performance: document pathsToLink default
We set the default with "normal" priority, so explicitly list it as `defaultText`.
1 parent 6418cf3 commit 47f4448

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

modules/performance.nix

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@
77
let
88
inherit (lib) types;
99
cfg = config.performance;
10+
11+
pathsToLink = [
12+
# :h rtp
13+
# TODO: "/filetype.lua" # filetypes (:h new-filetype)
14+
"/autoload" # automatically loaded scripts (:h autoload-functions)
15+
"/colors" # color scheme files (:h :colorscheme)
16+
"/compiler" # compiler files (:h :compiler)
17+
"/doc" # documentation (:h write-local-help)
18+
"/ftplugin" # filetype plugins (:h write-filetype-plugin)
19+
"/indent" # indent scripts (:h indent-expression)
20+
"/keymap" # key mapping files (:h mbyte-keymap)
21+
"/lang" # menu translations (:h :menutrans)
22+
"/lsp" # LSP client configurations (:h lsp-config)
23+
"/lua" # Lua plugins (:h lua)
24+
# TODO: "/menu.vim" # GUI menus (:h menu.vim)
25+
"/pack" # packages (:h :packadd)
26+
"/parser" # treesitter syntax parsers (:h treesitter)
27+
"/plugin" # plugin scripts (:h write-plugin)
28+
"/queries" # treesitter queries (:h treesitter)
29+
"/rplugin" # remote-plugin scripts (:h remote-plugin)
30+
"/spell" # spell checking files (:h spell)
31+
"/syntax" # syntax files (:h mysyntaxfile)
32+
"/tutor" # tutorial files (:h :Tutor)
33+
34+
# after
35+
"/after"
36+
37+
# ftdetect
38+
"/ftdetect"
39+
40+
# plenary.nvim
41+
"/data/plenary/filetypes"
42+
];
1043
in
1144
{
1245
options.performance = {
@@ -48,6 +81,8 @@ in
4881
pathsToLink = lib.mkOption {
4982
type = with types; listOf str;
5083
default = [ ];
84+
# We set this default below in `config` because we want to use default priority
85+
defaultText = pathsToLink;
5186
example = [ "/data" ];
5287
description = "List of paths to link into a combined plugin pack.";
5388
};
@@ -71,39 +106,6 @@ in
71106
pkgs.vimPlugins.plenary-nvim
72107
];
73108

74-
config.performance = {
75-
# Set option value with default priority so that values are appended by default
76-
combinePlugins.pathsToLink = [
77-
# :h rtp
78-
# TODO: "/filetype.lua" # filetypes (:h new-filetype)
79-
"/autoload" # automatically loaded scripts (:h autoload-functions)
80-
"/colors" # color scheme files (:h :colorscheme)
81-
"/compiler" # compiler files (:h :compiler)
82-
"/doc" # documentation (:h write-local-help)
83-
"/ftplugin" # filetype plugins (:h write-filetype-plugin)
84-
"/indent" # indent scripts (:h indent-expression)
85-
"/keymap" # key mapping files (:h mbyte-keymap)
86-
"/lang" # menu translations (:h :menutrans)
87-
"/lsp" # LSP client configurations (:h lsp-config)
88-
"/lua" # Lua plugins (:h lua)
89-
# TODO: "/menu.vim" # GUI menus (:h menu.vim)
90-
"/pack" # packages (:h :packadd)
91-
"/parser" # treesitter syntax parsers (:h treesitter)
92-
"/plugin" # plugin scripts (:h write-plugin)
93-
"/queries" # treesitter queries (:h treesitter)
94-
"/rplugin" # remote-plugin scripts (:h remote-plugin)
95-
"/spell" # spell checking files (:h spell)
96-
"/syntax" # syntax files (:h mysyntaxfile)
97-
"/tutor" # tutorial files (:h :Tutor)
98-
99-
# after
100-
"/after"
101-
102-
# ftdetect
103-
"/ftdetect"
104-
105-
# plenary.nvim
106-
"/data/plenary/filetypes"
107-
];
108-
};
109+
# Set option value with default priority so that values are appended by default
110+
config.performance.combinePlugins = { inherit pathsToLink; };
109111
}

0 commit comments

Comments
 (0)