mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-11 16:05:30 +00:00
120 lines
3.2 KiB
Nix
120 lines
3.2 KiB
Nix
{lib, ...}: let
|
|
inherit (lib.types) bool int str;
|
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
|
inherit (lib.options) mkOption mkEnableOption;
|
|
inherit (lib.nvim.binds) mkMappingOption;
|
|
hintConfig = {
|
|
float_opts = {
|
|
border = mkOption {
|
|
type = lib.types.str;
|
|
default = "none";
|
|
example = "rounded";
|
|
description = "The border style for the hint window";
|
|
};
|
|
};
|
|
position = mkOption {
|
|
default = "bottom";
|
|
type = lib.types.str;
|
|
description = "The position of the hint window";
|
|
example = "bottom";
|
|
};
|
|
};
|
|
generateHints = {
|
|
normal = mkOption {
|
|
type = bool;
|
|
default = true;
|
|
};
|
|
insert = mkOption {
|
|
type = bool;
|
|
default = true;
|
|
};
|
|
extend = mkOption {
|
|
type = bool;
|
|
default = true;
|
|
};
|
|
config = mkOption {
|
|
type = lib.types.attrsOf lib.types.str;
|
|
default = {
|
|
column_count = "nil";
|
|
max_hint_length = "25";
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
options.vim.utility.multicursors = {
|
|
enable = mkEnableOption "multicursors.nvim plugin (vscode like multiple cursors)";
|
|
#mappings = {
|
|
# mcStart = mkOption {
|
|
# type = lib.types.nullOr str;
|
|
# description = "Create a selection for selected text or word under the cursor [multicursors.nvim]";
|
|
# default = "<leader>ms";
|
|
#};
|
|
#mcStart = mkMappingOption "Create a selection for selected text or word under the cursor [multicursors.nvim]" "<leader>ms";
|
|
#};
|
|
setupOpts = mkPluginSetupOption "multicursors" {
|
|
DEBUG_MODE = mkOption {
|
|
type = bool;
|
|
default = false;
|
|
};
|
|
create_commands = mkOption {
|
|
type = bool;
|
|
default = true;
|
|
description = "Create Multicursor user commands";
|
|
};
|
|
updatetime = mkOption {
|
|
type = int;
|
|
default = 50;
|
|
description = "The time in milliseconds to wait before updating the cursor in insert mode";
|
|
};
|
|
nowait = mkOption {
|
|
type = bool;
|
|
default = true;
|
|
};
|
|
mode_keys = mkOption {
|
|
type = lib.types.attrsOf str;
|
|
description = "The keys to use for each mode";
|
|
default = {
|
|
insert = "i";
|
|
append = "a";
|
|
change = "c";
|
|
extend = "e";
|
|
};
|
|
};
|
|
normal_keys = mkOption {
|
|
type = lib.types.str;
|
|
default = "normal_keys";
|
|
};
|
|
insert_keys = mkOption {
|
|
type = lib.types.str;
|
|
default = "insert_keys";
|
|
};
|
|
extend_keys = mkOption {
|
|
type = lib.types.str;
|
|
default = "extend_keys";
|
|
};
|
|
hint_config = mkOption {
|
|
type = lib.types.submodule hintConfig;
|
|
description = "The configuration for the hint window";
|
|
default = {
|
|
float_opts = {
|
|
border = "none";
|
|
};
|
|
position = "bottom";
|
|
};
|
|
};
|
|
generate_hints = mkOption {
|
|
type = lib.types.submodule generateHints;
|
|
description = "The configuration for generating hints";
|
|
default = {
|
|
normal = true;
|
|
insert = true;
|
|
extend = true;
|
|
config = {
|
|
column_count = null;
|
|
max_hint_length = 25;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|