1
0
Fork 0
mirror of https://github.com/NotAShelf/neovim-flake.git synced 2024-12-25 10:19:48 +01:00

treewide: rename function defaultAttributes to pushDownDefault

This commit is contained in:
Frothy 2024-02-25 22:52:21 -05:00
parent 9a7087e53c
commit 4716fd731f
13 changed files with 25 additions and 25 deletions
lib
modules
filetree/nvimtree
git
lsp
nvim-code-action-menu
trouble
minimap
codewindow
minimap-vim
notes
mind-nvim
obsidian
orgmode
tabline/nvim-bufferline
utility
preview/glow
telescope

View file

@ -68,7 +68,7 @@ in
mkSetLuaBinding = binding: action: mkSetLuaBinding = binding: action:
mkLuaBinding binding.value action binding.description; mkLuaBinding binding.value action binding.description;
defaultAttributes = attr: self.mapAttrs (name: value: self.mkDefault value) attr; pushDownDefault = attr: self.mapAttrs (name: value: self.mkDefault value) attr;
# For forward compatibility. # For forward compatibility.
literalExpression = super.literalExpression or super.literalExample; literalExpression = super.literalExpression or super.literalExample;

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIf mkMerge mkBinding nvim boolToString defaultAttributes; inherit (lib) mkIf mkMerge mkBinding nvim boolToString pushDownDefault;
cfg = config.vim.filetree.nvimTree; cfg = config.vim.filetree.nvimTree;
self = import ./nvimtree.nix { self = import ./nvimtree.nix {
@ -23,7 +23,7 @@ in {
(mkBinding cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description) (mkBinding cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description)
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>t" = "+NvimTree"; "<leader>t" = "+NvimTree";
}; };

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (builtins) toJSON; inherit (builtins) toJSON;
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetExprBinding mkSetLuaBinding nvim defaultAttributes; inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetExprBinding mkSetLuaBinding nvim pushDownDefault;
cfg = config.vim.git; cfg = config.vim.git;
@ -61,7 +61,7 @@ in {
(mkSetLuaBinding gsMappings.resetHunk "function() package.loaded.gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end") (mkSetLuaBinding gsMappings.resetHunk "function() package.loaded.gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end")
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>g" = "+Gitsigns"; "<leader>g" = "+Gitsigns";
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim defaultAttributes; inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim pushDownDefault;
cfg = config.vim.lsp; cfg = config.vim.lsp;
@ -17,7 +17,7 @@ in {
vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>"; vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>c" = "+CodeAction"; "<leader>c" = "+CodeAction";
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim defaultAttributes; inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim pushDownDefault;
cfg = config.vim.lsp; cfg = config.vim.lsp;
@ -24,7 +24,7 @@ in {
(mkSetBinding mappings.locList "<cmd>TroubleToggle loclist<CR>") (mkSetBinding mappings.locList "<cmd>TroubleToggle loclist<CR>")
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>l" = "Trouble"; "<leader>l" = "Trouble";
"<leader>x" = "+Trouble"; "<leader>x" = "+Trouble";
"<leader>lw" = "Workspace"; "<leader>lw" = "Workspace";

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim defaultAttributes; inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim pushDownDefault;
cfg = config.vim.minimap.codewindow; cfg = config.vim.minimap.codewindow;
@ -24,7 +24,7 @@ in {
(mkSetLuaBinding mappings.toggleFocus "require('codewindow').toggle_focus") (mkSetLuaBinding mappings.toggleFocus "require('codewindow').toggle_focus")
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>m" = "+Minimap"; "<leader>m" = "+Minimap";
}; };

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf defaultAttributes; inherit (lib) mkIf pushDownDefault;
cfg = config.vim.minimap.minimap-vim; cfg = config.vim.minimap.minimap-vim;
in { in {
@ -14,7 +14,7 @@ in {
"minimap-vim" "minimap-vim"
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>m" = "+Minimap"; "<leader>m" = "+Minimap";
}; };
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf nvim defaultAttributes; inherit (lib) mkIf nvim pushDownDefault;
cfg = config.vim.notes.mind-nvim; cfg = config.vim.notes.mind-nvim;
in { in {
@ -18,7 +18,7 @@ in {
"<leader>oc" = {action = ":MindClose<CR>";}; "<leader>oc" = {action = ":MindClose<CR>";};
}; };
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>o" = "+Notes"; "<leader>o" = "+Notes";
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf nvim defaultAttributes; inherit (lib) mkIf nvim pushDownDefault;
cfg = config.vim.notes.obsidian; cfg = config.vim.notes.obsidian;
auto = config.vim.autocomplete; auto = config.vim.autocomplete;
@ -15,7 +15,7 @@ in {
"tabular" "tabular"
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>o" = "+Notes"; "<leader>o" = "+Notes";
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf mkMerge nvim defaultAttributes; inherit (lib) mkIf mkMerge nvim pushDownDefault;
cfg = config.vim.notes.orgmode; cfg = config.vim.notes.orgmode;
in { in {
@ -13,7 +13,7 @@ in {
"orgmode-nvim" "orgmode-nvim"
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>o" = "+Notes"; "<leader>o" = "+Notes";
}; };

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf mkMerge mkLuaBinding mkBinding nvim defaultAttributes; inherit (lib) mkIf mkMerge mkLuaBinding mkBinding nvim pushDownDefault;
cfg = config.vim.tabline.nvimBufferline; cfg = config.vim.tabline.nvimBufferline;
self = import ./nvim-bufferline.nix { self = import ./nvim-bufferline.nix {
@ -40,7 +40,7 @@ in {
(mkBinding cfg.mappings.movePrevious ":BufferLineMovePrev<CR>" mappings.movePrevious.description) (mkBinding cfg.mappings.movePrevious ":BufferLineMovePrev<CR>" mappings.movePrevious.description)
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>b" = "+Buffer"; "<leader>b" = "+Buffer";
"<leader>bm" = "BufferLineMove"; "<leader>bm" = "BufferLineMove";
"<leader>bs" = "BufferLineSort"; "<leader>bs" = "BufferLineSort";

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) nvim mkIf mkMerge mkBinding defaultAttributes; inherit (lib) nvim mkIf mkMerge mkBinding pushDownDefault;
cfg = config.vim.utility.preview.glow; cfg = config.vim.utility.preview.glow;
self = import ./glow.nix { self = import ./glow.nix {
@ -19,7 +19,7 @@ in {
(mkBinding cfg.mappings.openPreview ":Glow<CR>" mappings.openPreview.description) (mkBinding cfg.mappings.openPreview ":Glow<CR>" mappings.openPreview.description)
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>pm" = "+Preview Markdown"; "<leader>pm" = "+Preview Markdown";
}; };

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim defaultAttributes; inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim pushDownDefault;
cfg = config.vim.telescope; cfg = config.vim.telescope;
self = import ./telescope.nix {inherit lib;}; self = import ./telescope.nix {inherit lib;};
@ -52,7 +52,7 @@ in {
) )
]; ];
vim.binds.whichKey.register = defaultAttributes { vim.binds.whichKey.register = pushDownDefault {
"<leader>f" = "+Telescope"; "<leader>f" = "+Telescope";
"<leader>fl" = "Telescope LSP"; "<leader>fl" = "Telescope LSP";
"<leader>fm" = "Cellular Automaton"; "<leader>fm" = "Cellular Automaton";