{ config, lib, ... }: let inherit (builtins) map mapAttrs toJSON filter; inherit (lib.options) mkOption mkEnableOption literalMD literalExpression; inherit (lib.attrsets) filterAttrs getAttrs attrValues attrNames; inherit (lib.strings) optionalString isString concatStringsSep; inherit (lib.misc) mapAttrsFlatten; inherit (lib.trivial) showWarnings; inherit (lib.types) bool str oneOf attrsOf nullOr attrs submodule lines listOf; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) dagOf; inherit (lib.nvim.dag) entryAnywhere entryAfter topoSort mkLuarcSection mkVimrcSection; inherit (lib.nvim.lua) toLuaObject wrapLuaConfig; inherit (lib.nvim.vim) valToVim; inherit (lib.nvim.config) mkBool; cfg = config.vim; # 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