From 50609c731e6201e4dc7fe3b21cecf701283e29b6 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 21 Apr 2024 05:19:51 +0300 Subject: [PATCH] wrapper/rc: document `vim.globals` better --- modules/default.nix | 2 ++ modules/wrapper/rc/options.nix | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index aaedd42..fa72b9b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -81,6 +81,8 @@ inputs: { optional = false; }) (buildConfigPlugins vimOptions.optPlugins); + # combine built start and optional plugins + # into a single list plugins = builtStartPlugins ++ builtOptPlugins; # additional Lua and Python3 packages, mapped to their respective functions diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 3d0c9a3..44199ec 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -70,9 +70,19 @@ in { }; globals = mkOption { - default = {}; type = attrs; - description = "Set containing global variable values"; + default = {}; + description = '' + An attribute set containing global variable values + for storing vim variables as early as possible. If + populated, this soption will set vim variables in the + built configRC as the first item. + + E.g. {foo = "bar"} will set `g:foo` to "bar" where + the type of `bar` in the resulting vimscript will be + infered from the type of the value in the `{name = value}` + pair. + ''; }; configRC = mkOption {