stuff
This commit is contained in:
parent
7183ff87ef
commit
d2edfcc24b
|
@ -24,9 +24,7 @@
|
|||
];
|
||||
|
||||
flake = {
|
||||
lib = let
|
||||
nixpkgsLib = import nixpkgs.lib;
|
||||
in {
|
||||
lib = {
|
||||
inherit (import ./lib/stdlib-extended.nix nixpkgs.lib inputs) nvim;
|
||||
inherit (import ./configuration.nix inputs) neovimConfiguration;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{lib}: rec {
|
||||
{lib}: let
|
||||
inherit (lib) types;
|
||||
in rec {
|
||||
mkLuaBinding = key: action: desc:
|
||||
lib.mkIf (key != null) {
|
||||
"${key}" = {
|
||||
|
@ -28,7 +30,7 @@
|
|||
|
||||
mkMappingOption = description: default:
|
||||
lib.mkOption {
|
||||
type = lib.types.nullOrlib.types.str;
|
||||
type = with types; nullOr str;
|
||||
inherit default description;
|
||||
};
|
||||
|
||||
|
|
|
@ -9,4 +9,8 @@
|
|||
nmd = import ./nmd.nix;
|
||||
lua = import ./lua.nix {inherit lib;};
|
||||
binds = import ./binds.nix {inherit lib;};
|
||||
|
||||
imports = [
|
||||
(import ./binds.nix {inherit lib;})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,15 +8,17 @@ with lib; let
|
|||
(n: v: nameValuePair (removePrefix prefix n) {src = v;})
|
||||
(filterAttrs (n: _: hasPrefix prefix n) inputs);
|
||||
|
||||
rawPlugins = fromInputs inputs "plugin-";
|
||||
|
||||
# Define the helper function to extract the names from the name-value pairs
|
||||
getNames = list: mapAttrsToList (name: _: name) list;
|
||||
|
||||
rawPlugins = fromInputs inputs "plugin-";
|
||||
|
||||
# Map all plugin names to a list for pluginType to select from
|
||||
mappedPluginList = getNames rawPlugins;
|
||||
|
||||
finalPluginList = mappedPluginList ++ ["nvim-treesitter"];
|
||||
# Append plugins that are not in the mappedPluginList to the plugin list
|
||||
|
||||
finalPluginList = mappedPluginList ++ ["nvim-treesitter" "flutter-tools-patched"];
|
||||
|
||||
# either a package from nixpkgs, or a plugin from inputs ( + "nvim-treesitter")
|
||||
pluginType = with types;
|
||||
|
|
|
@ -5,7 +5,7 @@ with builtins; {
|
|||
autocomplete = {
|
||||
enable = mkEnableOption "enable autocomplete" // {default = false;};
|
||||
|
||||
mappings = {
|
||||
mappings = with nvim.binds; {
|
||||
complete = mkMappingOption "Complete [nvim-cmp]" "<C-Space>";
|
||||
confirm = mkMappingOption "Confirm [nvim-cmp]" "<CR>";
|
||||
next = mkMappingOption "Next item [nvim-cmp]" "<Tab>";
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
with nvim.binds; let
|
||||
cfg = config.vim.utility.motion.leap;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
|
|
Loading…
Reference in New Issue