mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/flit: init
This commit is contained in:
parent
cbddd58c69
commit
87ee660991
2 changed files with 102 additions and 0 deletions
63
plugins/by-name/flit/default.nix
Normal file
63
plugins/by-name/flit/default.nix
Normal 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;
|
||||
};
|
||||
}
|
39
tests/test-sources/plugins/by-name/flit/default.nix
Normal file
39
tests/test-sources/plugins/by-name/flit/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue