misc: refactor imports, prefer adding helpers to args rather than importing it

This commit is contained in:
Gaetan Lepage 2023-11-06 15:04:08 +01:00 committed by Gaétan Lepage
parent 541b694873
commit b6724702b4
160 changed files with 697 additions and 736 deletions

View file

@ -1,12 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
in {
with lib; {
# TODO those warnings have been added XX/XX/2023
# -> Remove them in ~ 1 month (oct. 2023)
imports =

View file

@ -1,12 +1,12 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.treesitter-context;
helpers = import ../../helpers.nix {inherit lib;};
in {
# Those warnings were introduced on 08/25/2023. TODO: remove them in October 2023.
imports = let

View file

@ -1,12 +1,11 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
in {
with lib; {
options.plugins.treesitter-refactor = let
disable = mkOption {
type = types.listOf types.str;

View file

@ -1,12 +1,12 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.treesitter;
helpers = import ../../helpers.nix {inherit lib;};
in {
options = {
plugins.treesitter = {

View file

@ -1,12 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
in {
with lib; {
options.plugins.ts-context-commentstring =
helpers.extraOptionsOptions
// {