From b30e8a1eda5803e46dd86d75d21d2a6e2c7b1004 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 8 Feb 2024 16:18:40 +0100 Subject: [PATCH] plugins/copilot-vim: remove deprecation warning --- plugins/completion/copilot-vim.nix | 70 ++++++++++++++---------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/plugins/completion/copilot-vim.nix b/plugins/completion/copilot-vim.nix index ef8e89e5..4d622415 100644 --- a/plugins/completion/copilot-vim.nix +++ b/plugins/completion/copilot-vim.nix @@ -3,46 +3,40 @@ pkgs, ... } @ args: -with lib; - ( - with (import ../helpers.nix {inherit lib;}).vim-plugin; - mkVimPlugin args { - name = "copilot-vim"; - description = "copilot.vim"; - package = pkgs.vimPlugins.copilot-vim; - globalPrefix = "copilot_"; +with lib; ( + with (import ../helpers.nix {inherit lib;}).vim-plugin; + mkVimPlugin args { + name = "copilot-vim"; + description = "copilot.vim"; + package = pkgs.vimPlugins.copilot-vim; + globalPrefix = "copilot_"; - options = { - nodeCommand = mkDefaultOpt { - global = "node_command"; - type = types.str; - default = "${pkgs.nodejs-18_x}/bin/node"; - description = "Tell Copilot what `node` binary to use."; - }; + options = { + nodeCommand = mkDefaultOpt { + global = "node_command"; + type = types.str; + default = "${pkgs.nodejs-18_x}/bin/node"; + description = "Tell Copilot what `node` binary to use."; + }; - filetypes = mkDefaultOpt { - type = with types; attrsOf bool; - description = '' - A dictionary mapping file types to their enabled status + filetypes = mkDefaultOpt { + type = with types; attrsOf bool; + description = '' + A dictionary mapping file types to their enabled status - Default: `{}` - ''; - example = { - "*" = false; - python = true; - }; - }; - - proxy = mkDefaultOpt { - type = types.str; - description = "Tell Copilot what proxy server to use."; - example = "localhost:3128"; + Default: `{}` + ''; + example = { + "*" = false; + python = true; }; }; - } - ) - // { - imports = [ - (lib.mkRenamedOptionModule ["plugins" "copilot"] ["plugins" "copilot-vim"]) - ]; - } + + proxy = mkDefaultOpt { + type = types.str; + description = "Tell Copilot what proxy server to use."; + example = "localhost:3128"; + }; + }; + } +)