mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
added formatter + reformat existing codebase (#175)
This commit is contained in:
parent
0bf4313f22
commit
264de8cefb
96 changed files with 3727 additions and 3341 deletions
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.copilot;
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.copilot;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options = {
|
||||
plugins.copilot = {
|
||||
enable = mkEnableOption "copilot";
|
||||
|
@ -12,11 +15,11 @@ in
|
|||
filetypes = mkOption {
|
||||
type = types.attrsOf types.bool;
|
||||
description = "A dictionary mapping file types to their enabled status";
|
||||
default = { };
|
||||
example = literalExpression ''{
|
||||
"*": false,
|
||||
python: true
|
||||
}'';
|
||||
default = {};
|
||||
example = literalExpression '' {
|
||||
"*": false,
|
||||
python: true
|
||||
}'';
|
||||
};
|
||||
proxy = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
|
@ -27,12 +30,17 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [ cfg.package ];
|
||||
globals = {
|
||||
config = mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
globals =
|
||||
{
|
||||
copilot_node_command = "${pkgs.nodejs-16_x}/bin/node";
|
||||
copilot_filetypes = cfg.filetypes;
|
||||
} // (if cfg.proxy != null then { copilot_proxy = cfg.proxy; } else { });
|
||||
};
|
||||
}
|
||||
// (
|
||||
if cfg.proxy != null
|
||||
then {copilot_proxy = cfg.proxy;}
|
||||
else {}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue