plugins/flit: init

This commit is contained in:
Johan Larsson 2025-01-01 21:47:46 +01:00 committed by Gaétan Lepage
parent cbddd58c69
commit 87ee660991
2 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,63 @@
{ lib, ... }:
let
inherit (lib) types;
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "flit";
packPathName = "flit.nvim";
package = "flit-nvim";
description = "f/F/t/T motions on steroids, building on the Leap interface.";
maintainers = [ lib.maintainers.jolars ];
settingsOptions = {
keys =
defaultNullOpts.mkAttrsOf types.str
{
f = "f";
F = "F";
t = "t";
T = "T";
}
''
Key mappings.
'';
labeled_modes = defaultNullOpts.mkStr "v" ''
A string like `"nv"`, `"nvo"`, `"o"`, etc.
'';
clever_repeat = defaultNullOpts.mkBool true ''
Whether to repeat with the trigger key itself.
'';
multiline = defaultNullOpts.mkBool true ''
Whether to enable multiline support.
'';
opts = defaultNullOpts.mkAttrsOf' {
type = types.anything;
pluginDefault = { };
example = lib.literalExpression ''
{
equivalence_classes.__empty = null;
}
'';
description = ''
Like `leap`s similar argument (call-specific overrides).
'';
};
};
settingsExample = {
keys = {
f = "f";
F = "F";
t = "t";
T = "T";
};
labeled_modes = "nv";
multiline = true;
};
}

View file

@ -0,0 +1,39 @@
{
empty = {
plugins.flit.enable = true;
};
defaults = {
plugins.flit = {
enable = true;
settings = {
keys = {
f = "f";
F = "F";
t = "t";
T = "T";
};
labeled_modes = "v";
clever_repeat = true;
multiline = true;
opts = { };
};
};
};
example = {
plugins.flit = {
enable = true;
settings = {
keys = {
f = "f";
F = "F";
t = "t";
T = "T";
};
labeled_modes = "nv";
multiline = true;
};
};
};
}