diff --git a/modules/modules.nix b/modules/modules.nix index 77a35ea..22bc84a 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -49,6 +49,7 @@ # using the configuration passed in `neovim` and `plugins` modules. wrapper = map (p: ./wrapper + "/${p}") [ "build" + "rc" "warnings" ]; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix deleted file mode 100644 index 2342bef..0000000 --- a/modules/neovim/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./init - ./mappings - ]; -} diff --git a/modules/neovim/mappings/config.nix b/modules/neovim/mappings/config.nix new file mode 100644 index 0000000..8bc58af --- /dev/null +++ b/modules/neovim/mappings/config.nix @@ -0,0 +1,59 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim; +in { + config = { + vim.maps = { + normal = + mkIf cfg.disableArrows { + "" = { + action = ""; + + noremap = false; + }; + "" = { + action = ""; + + noremap = false; + }; + "" = { + action = ""; + noremap = false; + }; + "" = { + action = ""; + noremap = false; + }; + } + // mkIf cfg.mapLeaderSpace { + "" = { + action = ""; + }; + }; + + insert = mkIf cfg.disableArrows { + "" = { + action = ""; + noremap = false; + }; + "" = { + action = ""; + noremap = false; + }; + "" = { + action = ""; + noremap = false; + }; + "" = { + action = ""; + noremap = false; + }; + }; + }; + }; +} diff --git a/modules/neovim/mappings/default.nix b/modules/neovim/mappings/default.nix index 8bc58af..18ce626 100644 --- a/modules/neovim/mappings/default.nix +++ b/modules/neovim/mappings/default.nix @@ -1,59 +1,6 @@ { - config, - lib, - ... -}: let - inherit (lib.modules) mkIf; - - cfg = config.vim; -in { - config = { - vim.maps = { - normal = - mkIf cfg.disableArrows { - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - } - // mkIf cfg.mapLeaderSpace { - "" = { - action = ""; - }; - }; - - insert = mkIf cfg.disableArrows { - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - }; - }; - }; + imports = [ + ./config.nix + #./options.nix + ]; } diff --git a/modules/neovim/mappings/options.nix b/modules/neovim/mappings/options.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 9cd7183..97788bd 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -3,418 +3,11 @@ 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 either path; - inherit (lib.generators) mkLuaInline; - inherit (lib.nvim.types) dagOf; - inherit (lib.nvim.dag) entryAnywhere entryAfter topoSort mkLuarcSection mkVimrcSection; - inherit (lib.nvim.lua) toLuaObject wrapLuaConfig listToLuaTable; - inherit (lib.nvim.vim) valToVim; - inherit (lib.nvim.config) mkBool; + inherit (lib.attrsets) attrValues; 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