From 47f44488aeb295622cdac273d4449be08fbee1d7 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 26 Apr 2025 14:03:58 +0100 Subject: [PATCH] modules/performance: document `pathsToLink` default We set the default with "normal" priority, so explicitly list it as `defaultText`. --- modules/performance.nix | 72 +++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/modules/performance.nix b/modules/performance.nix index 29a537ed..567f6d93 100644 --- a/modules/performance.nix +++ b/modules/performance.nix @@ -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; }; }