plugins/cmp: remove with lib;

This commit is contained in:
Austin Horstman 2024-10-06 09:57:31 -05:00
parent d71cfaaae8
commit 62b87e5b56
No known key found for this signature in database
13 changed files with 92 additions and 92 deletions

View file

@ -1,5 +1,4 @@
{ lib, helpers }:
with lib;
rec {
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
@ -28,13 +27,13 @@ rec {
};
attrsOfOptions =
with types;
with lib.types;
attrsOf (submodule {
freeformType = attrsOf anything;
options = settingsOptions;
});
filetype = mkOption {
filetype = lib.mkOption {
type = attrsOfOptions;
default = { };
description = "Options provided to the `require('cmp').setup.filetype` function.";
@ -45,7 +44,7 @@ rec {
};
};
cmdline = mkOption {
cmdline = lib.mkOption {
type = attrsOfOptions;
default = { };
description = "Options provided to the `require('cmp').setup.cmdline` function.";

View file

@ -1,5 +1,7 @@
{ lib, helpers }:
with lib;
let
inherit (lib) mkOption types;
in
{
performance = {
debounce = helpers.defaultNullOpts.mkUnsignedInt 60 ''
@ -261,7 +263,9 @@ with lib;
in
{
completion = {
border = helpers.defaultNullOpts.mkBorder (genList (_: "") 8) "nvim-cmp completion popup menu" "";
border = helpers.defaultNullOpts.mkBorder (lib.genList (
_: ""
) 8) "nvim-cmp completion popup menu" "";
winhighlight = mkWinhighlightOption "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None";
@ -286,7 +290,7 @@ with lib;
};
documentation = {
border = helpers.defaultNullOpts.mkBorder (genList (
border = helpers.defaultNullOpts.mkBorder (lib.genList (
_: ""
) 8) "nvim-cmp documentation popup menu" "";

View file

@ -1,10 +1,11 @@
{ lib, helpers }:
with lib;
let
inherit (lib) types;
sourceType = types.submodule {
freeformType = with types; attrsOf anything;
options = {
name = mkOption {
name = lib.mkOption {
type = types.str;
description = "The name of the source.";
example = "buffer";
@ -79,7 +80,7 @@ let
};
};
in
mkOption {
lib.mkOption {
default = [ ];
type = with lib.types; maybeRaw (listOf sourceType);
description = ''