{ config, lib, ... }: let inherit (builtins) attrValues attrNames map mapAttrs toJSON isString concatStringsSep filter; inherit (lib.options) mkOption literalExpression mdDoc; inherit (lib.attrsets) filterAttrs getAttrs; inherit (lib.strings) optionalString; inherit (lib.misc) mapAttrsFlatten; inherit (lib.trivial) showWarnings; inherit (lib.types) bool str listOf oneOf attrsOf nullOr attrs submodule unspecified lines; inherit (lib.nvim.types) dagOf pluginsOpt extraPluginType; inherit (lib.nvim.dag) entryAnywhere entryAfter topoSort; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.vim) valToVim; cfg = config.vim; wrapLuaConfig = luaConfig: '' lua << EOF ${optionalString cfg.enableLuaLoader '' vim.loader.enable() ''} ${luaConfig} EOF ''; mkBool = value: description: mkOption { type = bool; default = value; inherit description; }; # Most of the keybindings code is highly inspired by pta2002/nixvim. Thank you! mapConfigOptions = { silent = mkBool false "Whether this mapping should be silent. Equivalent to adding to a map."; nowait = mkBool false "Whether to wait for extra input on ambiguous mappings. Equivalent to adding to a map."; script = mkBool false "Equivalent to adding