mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-17 07:39:57 +00:00
Merge pull request #1450 from alfarelcynthesis/no-default-mappings-option
treewide: allow disabling nvf mappings
This commit is contained in:
parent
63d5d8b2d4
commit
3ab2d5d876
52 changed files with 489 additions and 622 deletions
|
|
@ -1,9 +1,13 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) anything attrsOf listOf enum;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.ccc = {
|
||||
enable = mkEnableOption "ccc color picker for neovim";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.gestures.gesture-nvim = {
|
||||
enable = mkEnableOption "gesture-nvim: mouse gestures";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.navigation.harpoon = {
|
||||
mappings = {
|
||||
|
|
|
|||
|
|
@ -1,38 +1,22 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) nullOr str;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.motion.flash-nvim = {
|
||||
enable = mkEnableOption "enhanced code navigation with flash.nvim";
|
||||
setupOpts = mkPluginSetupOption "flash-nvim" {};
|
||||
|
||||
mappings = {
|
||||
jump = mkOption {
|
||||
type = nullOr str;
|
||||
default = "s";
|
||||
description = "Jump";
|
||||
};
|
||||
treesitter = mkOption {
|
||||
type = nullOr str;
|
||||
default = "S";
|
||||
description = "Treesitter";
|
||||
};
|
||||
remote = mkOption {
|
||||
type = nullOr str;
|
||||
default = "r";
|
||||
description = "Remote Flash";
|
||||
};
|
||||
treesitter_search = mkOption {
|
||||
type = nullOr str;
|
||||
default = "R";
|
||||
description = "Treesitter Search";
|
||||
};
|
||||
toggle = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<c-s>";
|
||||
description = "Toggle Flash Search";
|
||||
};
|
||||
jump = mkMappingOption "Jump" "s";
|
||||
treesitter = mkMappingOption "Treesitter" "S";
|
||||
remote = mkMappingOption "Remote Flash" "r";
|
||||
treesitter_search = mkMappingOption "Treesitter Search" "R";
|
||||
toggle = mkMappingOption "Toggle Flash Search" "<c-s>";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.motion.hop = {
|
||||
mappings = {
|
||||
|
|
|
|||
|
|
@ -1,36 +1,20 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) nullOr str;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.motion.leap = {
|
||||
enable = mkEnableOption "leap.nvim plugin (easy motion)";
|
||||
|
||||
mappings = {
|
||||
leapForwardTo = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Leap forward to";
|
||||
default = "<leader>ss";
|
||||
};
|
||||
leapBackwardTo = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Leap backward to";
|
||||
default = "<leader>sS";
|
||||
};
|
||||
leapForwardTill = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Leap forward till";
|
||||
default = "<leader>sx";
|
||||
};
|
||||
leapBackwardTill = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Leap backward till";
|
||||
default = "<leader>sX";
|
||||
};
|
||||
leapFromWindow = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Leap from window";
|
||||
default = "gs";
|
||||
};
|
||||
leapForwardTo = mkMappingOption "Leap forward to" "<leader>ss";
|
||||
leapBackwardTo = mkMappingOption "Leap backward to" "<leader>sS";
|
||||
leapForwardTill = mkMappingOption "Leap forward till" "<leader>sx";
|
||||
leapBackwardTill = mkMappingOption "Leap backward till" "<leader>sX";
|
||||
leapFromWindow = mkMappingOption "Leap from window" "gs";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.outline.aerial-nvim = {
|
||||
enable = mkEnableOption "Aerial.nvim";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule ["vim" "languages" "markdown" "glow" "enable"] ["vim" "utility" "preview" "glow" "enable"])
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) bool;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.smart-splits = {
|
||||
enable = mkOption {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.options) literalExpression mkOption;
|
||||
inherit (lib.types) bool str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
|
||||
|
|
@ -64,7 +64,8 @@ in {
|
|||
|
||||
useVendoredKeybindings = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
default = config.vim.vendoredKeymaps.enable;
|
||||
defaultText = literalExpression "config.vim.vendoredKeymaps.enable";
|
||||
description = ''
|
||||
Use alternative set of keybindings that avoids conflicts with other popular plugins, e.g. nvim-leap
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) int str listOf float bool either enum submodule attrsOf anything package;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
|
||||
cfg = config.vim.telescope;
|
||||
setupOptions = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.yazi-nvim = {
|
||||
enable = mkEnableOption ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue