mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 03:56:11 +00:00
plugins: use mkMappingOption instead of mkOption where possible
This commit is contained in:
parent
f040b4a943
commit
5e1ee37e7f
9 changed files with 113 additions and 411 deletions
|
|
@ -1,4 +1,8 @@
|
|||
{lib, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib.types)
|
||||
nullOr
|
||||
|
|
@ -10,30 +14,16 @@
|
|||
;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
in {
|
||||
options.vim.assistant.supermaven-nvim = {
|
||||
enable = mkEnableOption "Supermaven AI assistant";
|
||||
|
||||
setupOpts = mkPluginSetupOption "Supermaven" {
|
||||
keymaps = {
|
||||
accept_suggestion = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "<Tab>";
|
||||
description = "The key to accept a suggestion";
|
||||
};
|
||||
clear_suggestion = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "<C-]>";
|
||||
description = "The key to clear a suggestion";
|
||||
};
|
||||
accept_word = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "<C-j>";
|
||||
description = "The key to accept a word";
|
||||
};
|
||||
accept_suggestion = mkMappingOption "The key to accept a suggestion" null // {example = "<Tab>";};
|
||||
clear_suggestion = mkMappingOption "The key to clear a suggestion" null // {example = "<C-]>";};
|
||||
accept_word = mkMappingOption "The key to accept a word" null // {example = "<C-j>";};
|
||||
};
|
||||
ignore_file = mkOption {
|
||||
type = nullOr (attrsOf bool);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue