mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/cornelis: init
This commit is contained in:
parent
8f7600aca0
commit
67bbdf9318
2 changed files with 85 additions and 0 deletions
54
plugins/by-name/cornelis/default.nix
Normal file
54
plugins/by-name/cornelis/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
|
in
|
||||||
|
lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
name = "cornelis";
|
||||||
|
globalPrefix = "cornelis_";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
|
extraOptions = {
|
||||||
|
cornelisPackage = lib.mkPackageOption pkgs "cornelis" {
|
||||||
|
nullable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
|
extraPackages = [ cfg.cornelisPackage ];
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
use_global_binary = defaultNullOpts.mkFlagInt 0 ''
|
||||||
|
Whether to use global binary instead of stack.
|
||||||
|
'';
|
||||||
|
|
||||||
|
agda_prefix = defaultNullOpts.mkStr' {
|
||||||
|
pluginDefault = "<localleader>";
|
||||||
|
example = "<Tab>";
|
||||||
|
description = ''
|
||||||
|
Prefix used for agda keybindings.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
no_agda_input = defaultNullOpts.mkFlagInt 0 ''
|
||||||
|
Disable the default keybindings.
|
||||||
|
'';
|
||||||
|
|
||||||
|
bind_input_hook = defaultNullOpts.mkStr' {
|
||||||
|
pluginDefault = null;
|
||||||
|
example = "MyCustomHook";
|
||||||
|
description = ''
|
||||||
|
If you'd prefer to manage agda-input entirely on your own (perhaps in a snippet system), you
|
||||||
|
can customize the bind input hook.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
use_global_binary = 1;
|
||||||
|
agda_prefix = "<Tab>";
|
||||||
|
no_agda_input = 1;
|
||||||
|
bind_input_hook = "MyCustomHook";
|
||||||
|
};
|
||||||
|
}
|
31
tests/test-sources/plugins/by-name/cornelis/default.nix
Normal file
31
tests/test-sources/plugins/by-name/cornelis/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.cornelis.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.cornelis = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
use_global_binary = 0;
|
||||||
|
agda_prefix = "<localleader>";
|
||||||
|
no_agda_input = 0;
|
||||||
|
bind_input_hook = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.cornelis = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
use_global_binary = 1;
|
||||||
|
agda_prefix = "<Tab>";
|
||||||
|
no_agda_input = 1;
|
||||||
|
bind_input_hook = "MyCustomHook";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue