From 53c85ca262c40c53087f91c81281c16864849a92 Mon Sep 17 00:00:00 2001 From: Devin Droddy Date: Sat, 5 Jul 2025 11:15:37 -0400 Subject: [PATCH] assistant/supermaven-nvim: explicit type imports --- .../supermaven-nvim/supermaven-nvim.nix | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix b/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix index 651dfdf6..4f1acb66 100644 --- a/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix +++ b/modules/plugins/assistant/supermaven-nvim/supermaven-nvim.nix @@ -1,80 +1,86 @@ {lib, ...}: let - inherit (lib) types; + inherit + (lib.types) + nullOr + str + bool + attrsOf + ints + enum + ; inherit (lib.options) mkOption mkEnableOption; in { options.vim.assistant.supermaven-nvim = { enable = mkEnableOption "Supermaven AI assistant"; - setupOpts = lib.nvim.types.mkPluginSetupOption "Supermaven" { + setupOpts = lib.nvim.mkPluginSetupOption "Supermaven" { keymaps = { accept_suggestion = mkOption { - type = types.nullOr lib.types.str; + type = nullOr str; default = null; example = ""; description = "The key to accept a suggestion"; }; clear_suggestion = mkOption { - type = types.nullOr lib.types.str; + type = nullOr str; default = null; example = ""; description = "The key to clear a suggestion"; }; accept_word = mkOption { - type = types.nullOr lib.types.str; + type = nullOr str; default = null; example = ""; description = "The key to accept a word"; }; }; - ignore_filetypes = mkOption { - type = types.nullOr (types.attrsOf types.bool); + ignore_file = mkOption { + type = nullOr (attrsOf bool); default = null; example = { markdown = true; }; - description = "List of filetypes to ignore"; + description = "List of fileto ignore"; }; color = { suggestion_color = mkOption { - type = types.nullOr types.str; + type = nullOr str; default = null; example = "#ffffff"; description = "The hex color of the suggestion"; }; cterm = mkOption { - type = types.nullOr types.ints.u8; + type = nullOr ints.u8; default = null; example = 244; description = "The cterm color of the suggestion"; }; }; log_level = mkOption { - type = types.nullOr ( - types.enum [ - "off" - "trace" - "debug" - "info" - "warn" - "error" - ] - ); + type = nullOr (enum [ + "off" + "trace" + "debug" + "info" + "warn" + "error" + ]); default = null; example = "info"; description = "The log level. Set to `\"off\"` to disable completely"; }; disable_inline_completion = mkOption { - type = types.nullOr types.bool; + type = nullOr bool; default = null; description = "Disable inline completion for use with cmp"; }; disable_keymaps = mkOption { - type = types.nullOr types.bool; + type = nullOr bool; default = null; description = "Disable built-in keymaps for more manual control"; }; condition = mkOption { - type = types.nullOr lib.nvim.types.luaInline; + type = nullOr lib.nvim.luaInline; default = null; description = '' Condition function to check for stopping supermaven.