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,11 +1,10 @@
{
config,
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../lib/helpers.nix {inherit lib;};
autoGroupOption = types.submodule {
options = {
clear = mkOption {

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
pkgs,
...
}:

View file

@ -1,10 +1,10 @@
{
config,
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../lib/helpers.nix {inherit lib;};
commandAttributes = types.submodule {
options = {
command = mkOption {

View file

@ -1,10 +1,10 @@
{
config,
lib,
helpers,
config,
...
} @ args:
}:
with lib; let
helpers = import ../lib/helpers.nix args;
filetypeDefinition = helpers.mkNullOrOption (types.attrsOf (
types.oneOf [
# Raw filetype

View file

@ -1,11 +1,10 @@
{
config,
lib,
helpers,
config,
...
}: let
helpers = import ../lib/helpers.nix {inherit lib;};
in
with lib; {
}:
with lib; {
options = {
highlight = mkOption {
type = types.attrsOf helpers.highlightType;
@ -55,4 +54,4 @@ in
-- }}
'');
};
}
}

View file

@ -1,11 +1,10 @@
{
config,
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../lib/helpers.nix {inherit lib;};
in {
with lib; {
options = {
maps =
mapAttrs

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
...
}:
with lib; let

View file

@ -1,11 +1,10 @@
{
config,
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../lib/helpers.nix {inherit lib;};
in {
with lib; {
options = {
options = mkOption {
type = types.attrsOf types.anything;

View file

@ -1,7 +1,6 @@
{
pkgs,
config,
lib,
config,
...
}:
with lib; let

View file

@ -1,12 +1,12 @@
{
lib,
pkgs,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.barbar;
helpers = import ../helpers.nix {inherit lib;};
bufferOptions = {
bufferIndex = helpers.mkNullOrOption types.bool ''

View file

@ -1,12 +1,12 @@
{
lib,
pkgs,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.barbecue;
helpers = import ../helpers.nix {inherit lib;};
mkListStr = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
in {
options.plugins.barbecue =

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
config,
pkgs,
lib,
...
} @ args:
}:
with lib; let
cfg = config.plugins.bufferline;
helpers = import ../helpers.nix args;
highlightOption = {
fg = helpers.mkNullOrOption types.str "foreground color";

View file

@ -1,13 +1,12 @@
{
lib,
pkgs,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.navic;
helpers = import ../helpers.nix {inherit lib;};
mkListStr = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
in {
options.plugins.navic =
helpers.extraOptionsOptions

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
cfg = config.colorschemes.catppuccin;
helpers = import ../helpers.nix args;
flavours = [
"latte"

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.colorschemes.gruvbox;
helpers = import ../helpers.nix {inherit lib;};
colors = types.enum ["bg" "red" "green" "yellow" "blue" "purple" "aqua" "gray" "fg" "bg0_h" "bg0" "bg1" "bg2" "bg3" "bg4" "gray" "orange" "bg0_s" "fg0" "fg1" "fg2" "fg3" "fg4"];
in {
options = {

View file

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

View file

@ -1,17 +1,17 @@
{
pkgs,
lib,
helpers,
pkgs,
config,
...
}: let
inherit (lib) mkEnableOption mkDefault mkIf;
inherit (import ../helpers.nix {inherit lib;}) mkPackageOption;
cfg = config.colorschemes.melange;
in {
options = {
colorschemes.melange = {
enable = mkEnableOption "Melange colorscheme";
package = mkPackageOption "melange.nvim" pkgs.vimPlugins.melange-nvim;
package = helpers.mkPackageOption "melange.nvim" pkgs.vimPlugins.melange-nvim;
};
};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
cfg = config.colorschemes.rose-pine;
helpers = import ../helpers.nix args;
in {
options = {
colorschemes.rose-pine = {

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.plugins.copilot-vim;
helpers = import ../helpers.nix {inherit lib;};
in {
imports = [
(lib.mkRenamedOptionModule ["plugins" "copilot"] ["plugins" "copilot-vim"])

View file

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

View file

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

View file

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

View file

@ -1,8 +1,9 @@
{
lib,
config,
pkgs,
...
} @ attrs: let
}: let
helpers = import ../../helpers.nix {inherit lib;};
in
with helpers;
@ -13,7 +14,7 @@ in
useDefaultPackage ? true,
...
}:
mkPlugin attrs {
mkPlugin {inherit lib config pkgs;} {
inherit name;
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
description = "Enable ${name}";

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
pkgs,
config,
lib,
...
} @ args:
with lib; let
cfg = config.plugins.nvim-cmp;
helpers = import ../../helpers.nix {inherit lib;};
cmpLib = import ./cmp-helpers.nix args;
snippetEngines = {

View file

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

View file

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

View file

@ -1,11 +1,11 @@
{
config,
lib,
helpers,
config,
...
}:
with lib; let
cfg = config.plugins.crates-nvim;
helpers = import ../../../helpers.nix {inherit lib;};
in {
options.plugins.crates-nvim = helpers.extraOptionsOptions;

View file

@ -1,11 +1,12 @@
{
lib,
config,
pkgs,
...
} @ attrs:
}:
with lib; let
cmpLib = import ../cmp-helpers.nix attrs;
cmpSourcesPluginNames = lib.attrValues cmpLib.pluginAndSourceNames;
cmpLib = import ../cmp-helpers.nix {inherit lib config pkgs;};
cmpSourcesPluginNames = attrValues cmpLib.pluginAndSourceNames;
pluginModules = lists.map (name: cmpLib.mkCmpSourcePlugin {inherit name;}) cmpSourcesPluginNames;
in {
# For extra cmp plugins

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.dap.extensions.dap-ui;
helpers = import ../helpers.nix {inherit lib;};
mkSizeOption =
helpers.mkNullOrOption

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.dap.extensions.dap-virtual-text;
helpers = import ../helpers.nix {inherit lib;};
in {
options.plugins.dap.extensions.dap-virtual-text = {
enable = mkEnableOption "dap-virtual-text";

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.chadtree;
helpers = import ../helpers.nix {inherit lib;};
mkListStr = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
in {
options.plugins.chadtree =

View file

@ -1,13 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.neo-tree;
helpers = import ../helpers.nix {inherit lib;};
basePluginPath = ["plugins" "neo-tree"];
in {
imports = [

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
pkgs,
config,
lib,
...
} @ args:
}:
with lib; let
cfg = config.plugins.nvim-tree;
helpers = import ../helpers.nix {inherit lib;};
inherit (helpers) ifNonNull';
openWinConfigOption =

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.diffview;
helpers = import ../helpers.nix {inherit lib;};
mkWinConfig = type: width: height: position:
with helpers.defaultNullOpts; {
type = mkEnum ["split" "float"] type ''

View file

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

View file

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

View file

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

View file

@ -1,12 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
} @ args:
with lib; let
helpers = import ../helpers.nix args;
in {
}:
with lib; {
options.plugins.gitmessenger = {
enable = mkEnableOption "gitmessenger";

View file

@ -1,11 +1,11 @@
{
config,
lib,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
helpers = import ../helpers.nix args;
signOptions = defaults: {
hl =
helpers.defaultNullOpts.mkStr defaults.hl

View file

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

View file

@ -1,12 +1,12 @@
{
lib,
pkgs,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.clangd-extensions;
helpers = import ../helpers.nix {inherit lib;};
basePluginPath = ["plugins" "clangd-extensions"];

View file

@ -1,11 +1,11 @@
{
pkgs,
lib,
helpers,
pkgs,
config,
...
}: let
cfg = config.plugins.julia-cell;
helpers = import ../../helpers.nix {inherit lib;};
# The keys are the option name in nixvim (under plugins.julia-cell.keymaps)
# cmd: Such that the mapping action is ':JuliaCell${cmd}<CR>'

View file

@ -1,6 +1,6 @@
{
pkgs,
lib,
pkgs,
...
} @ args:
with lib;

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
lib,
pkgs,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
defaultFuzzyFinder = "skim";
helpers = import ../helpers.nix args;
in {
options.plugins.openscad = {
enable = mkEnableOption "openscad.nvim, a plugin to manage OpenSCAD files";

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.plantuml-syntax = {
enable = mkEnableOption "plantuml syntax support";

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.sniprun;
helpers = import ../helpers.nix {inherit lib;};
mkList = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
in {

View file

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

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
// {

View file

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

View file

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

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.plugins.lsp;
helpers = import ../helpers.nix {inherit lib;};
in {
imports = [
./language-servers

View file

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

View file

@ -1,7 +1,7 @@
{
lib,
pkgs,
config,
lib,
...
}: {
mkLsp = {

View file

@ -1,12 +1,11 @@
{
lib,
helpers,
config,
pkgs,
...
} @ args:
with lib; let
helpers = import ../helpers.nix args;
in {
}:
with lib; {
options.plugins.inc-rename = {
enable = mkEnableOption "inc-rename, a plugin previewing LSP renaming";

View file

@ -1,11 +1,10 @@
{
pkgs,
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
cfg = config.plugins.lsp.servers.ccls;
in {
# Options: https://github.com/MaskRay/ccls/wiki/Customization#initialization-options

View file

@ -1,11 +1,12 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
} @ args:
}:
with lib; let
lspHelpers = import ../helpers.nix args;
helpers = import ../../helpers.nix {inherit lib;};
lspHelpers = import ../helpers.nix {inherit lib config pkgs;};
servers = [
{

View file

@ -1,12 +1,11 @@
{
lib,
helpers,
config,
pkgs,
lib,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
tools = trivial.importJSON ./efmls-configs-tools.json;
inherit (tools) linters formatters;

View file

@ -1,11 +1,11 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
cfg = config.plugins.lsp.servers.nixd;
in {
# Options: https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#configuration

View file

@ -1,11 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
cfg = config.plugins.lsp.servers.pylsp;
in {
# All settings are documented here:

View file

@ -1,10 +1,10 @@
{
lib,
helpers,
config,
...
}:
with lib; let
helpers = import ../../helpers.nix {inherit lib;};
cfg = config.plugins.lsp.servers.svelte;
in {
# Options: https://github.com/sveltejs/language-tools/tree/master/packages/language-server#settings

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.lspsaga;
helpers = import ../helpers.nix {inherit lib;};
mkKeymapOption = default:
helpers.defaultNullOpts.mkNullable

View file

@ -1,12 +1,11 @@
{
pkgs,
lib,
helpers,
config,
pkgs,
...
}: let
helpers = import ../helpers.nix {inherit lib;};
in
with lib; {
}:
with lib; {
options.plugins.nvim-lightbulb = {
enable = mkEnableOption "nvim-lightbulb, showing available code actions";
@ -87,4 +86,4 @@ in
require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions})
'';
};
}
}

View file

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

View file

@ -1,12 +1,12 @@
{
lib,
helpers,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.plugins.none-ls;
helpers = import ../helpers.nix {inherit lib;};
in {
imports = [
./servers.nix

View file

@ -1,9 +1,4 @@
{
pkgs,
config,
lib,
...
}: {
mkServer = {
name,
sourceType,

View file

@ -3,8 +3,8 @@
config,
lib,
...
} @ args: let
helpers = import ./helpers.nix args;
}: let
helpers = import ./helpers.nix;
serverData = {
code_actions = {
eslint = {

View file

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

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.airline;
helpers = import ../helpers.nix {inherit lib;};
sectionType = with types; nullOr (oneOf [str (listOf str)]);
sectionOption = mkOption {

View file

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

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.lualine;
helpers = import ../helpers.nix {inherit lib;};
mkSeparatorsOption = {
leftDefault ? " ",

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.telescope;
helpers = import ../helpers.nix {inherit lib;};
in {
imports = [
./file-browser.nix

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.telescope.extensions.file_browser;
helpers = import ../helpers.nix {inherit lib;};
hiddenOption = types.submodule {
options = {

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.telescope.extensions.frecency;
helpers = import ../helpers.nix {inherit lib;};
in {
options.plugins.telescope.extensions.frecency = {
enable = mkEnableOption "frecency";

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.telescope.extensions.fzf-native;
helpers = import ../helpers.nix {inherit lib;};
in {
options.plugins.telescope.extensions.fzf-native = {
enable = mkEnableOption "fzf-native";

View file

@ -1,12 +1,12 @@
{
pkgs,
config,
lib,
helpers,
config,
pkgs,
...
}:
with lib; let
cfg = config.plugins.telescope.extensions.media_files;
helpers = import ../helpers.nix {inherit lib;};
in {
options.plugins.telescope.extensions.media_files = {
enable = mkEnableOption "media_files extension for telescope";

Some files were not shown because too many files have changed in this diff Show more