mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
languages: coerce server type to list for compat
This commit is contained in:
parent
76c031bbda
commit
9407a3e1c6
34 changed files with 98 additions and 103 deletions
|
@ -1,7 +1,8 @@
|
|||
{lib}: let
|
||||
inherit (lib.options) mergeEqualOption;
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.strings) isString stringLength match;
|
||||
inherit (lib.types) listOf mkOptionType;
|
||||
inherit (lib.types) listOf mkOptionType coercedTo;
|
||||
in {
|
||||
mergelessListOf = elemType: let
|
||||
super = listOf elemType;
|
||||
|
@ -27,4 +28,6 @@ in {
|
|||
description = "RGB color in hex format";
|
||||
check = v: isString v && (match "#?[0-9a-fA-F]{6}" v) != null;
|
||||
};
|
||||
|
||||
singleOrListOf = t: coercedTo t singleton (listOf t);
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ in {
|
|||
inherit (typesDag) dagOf;
|
||||
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
|
||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||
inherit (customTypes) char hexColor mergelessListOf;
|
||||
inherit (customTypes) char hexColor mergelessListOf singleOrListOf;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) package enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -34,7 +34,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Assembly LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Assembly LSP server to use";
|
||||
};
|
||||
|
|
|
@ -7,12 +7,10 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum either listOf package str;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
cfg = config.vim.languages.astro;
|
||||
|
@ -91,7 +89,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Astro LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Astro LSP server to use";
|
||||
};
|
||||
|
|
|
@ -5,14 +5,12 @@
|
|||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.types) enum either package listOf str bool;
|
||||
inherit (lib.types) enum package bool;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.types) diagnostics mkGrammarOption;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.types) diagnostics mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.bash;
|
||||
|
@ -57,7 +55,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Bash LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Bash LSP server to use";
|
||||
};
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool enum package listOf;
|
||||
inherit (lib.types) bool enum package;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
|
||||
|
@ -198,7 +198,7 @@ in {
|
|||
|
||||
servers = mkOption {
|
||||
description = "The clang LSP server to use";
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames concatMap;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) listOf enum;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -148,7 +148,7 @@ in {
|
|||
enable = mkEnableOption "C# LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
description = "C# LSP server to use";
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf package;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.css;
|
||||
|
|
|
@ -8,12 +8,10 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum either listOf package nullOr str bool;
|
||||
inherit (lib.types) enum package nullOr str bool;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -54,7 +52,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Dart LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Dart LSP server to use";
|
||||
};
|
||||
|
|
|
@ -7,12 +7,10 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum either listOf package str;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -63,7 +61,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Elixir LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Elixir LSP server to use";
|
||||
};
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) listOf package enum;
|
||||
inherit (lib.types) package enum;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
defaultServer = ["fsautocomplete"];
|
||||
|
@ -72,7 +72,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "F# LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServer;
|
||||
description = "F# LSP server to use";
|
||||
};
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum either listOf package str;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.gleam;
|
||||
|
@ -37,7 +35,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Gleam LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Gleam LSP server to use";
|
||||
};
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.types) bool enum package listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) bool enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.helm;
|
||||
|
@ -49,7 +49,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Helm LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Helm LSP server to use";
|
||||
};
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) listOf enum;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.dag) entryBefore;
|
||||
|
@ -97,7 +97,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Java LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = ''
|
||||
Julia LSP Server to Use
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool enum package listOf str nullOr;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption;
|
||||
inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -63,7 +63,7 @@ in {
|
|||
|
||||
servers = mkOption {
|
||||
description = "Markdown LSP server to use";
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe';
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf package;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -59,7 +59,7 @@ in {
|
|||
enable = mkEnableOption "Nim LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Nim LSP server to use";
|
||||
};
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
inherit (lib.meta) getExe;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum package listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.nix;
|
||||
|
@ -98,7 +98,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Nix LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Nix LSP server to use";
|
||||
};
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
@ -46,7 +46,7 @@ in {
|
|||
enable = mkEnableOption "Nu LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Nu LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf package;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -74,7 +74,7 @@ in {
|
|||
enable = mkEnableOption "OCaml LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "OCaml LSP server to use";
|
||||
};
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) listOf enum;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -46,7 +46,7 @@ in {
|
|||
enable = mkEnableOption "Odin LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Odin LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
|
@ -77,7 +77,7 @@ in {
|
|||
enable = mkEnableOption "PHP LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "PHP LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf package str bool;
|
||||
inherit (lib.types) enum package bool;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.types) singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.dag) entryBefore;
|
||||
|
||||
|
@ -229,7 +230,7 @@ in {
|
|||
enable = mkEnableOption "Python LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Python LSP server to use";
|
||||
};
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf package;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
|
@ -77,7 +77,7 @@ in {
|
|||
enable = mkEnableOption "R LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "R LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
||||
inherit (lib.types) listOf package enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
||||
inherit (lib.types) package enum;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.ruby;
|
||||
|
@ -77,7 +77,7 @@ in {
|
|||
enable = mkEnableOption "Ruby LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Ruby LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf package str;
|
||||
inherit (lib.nvim.types) diagnostics;
|
||||
inherit (lib.types) enum package str;
|
||||
inherit (lib.nvim.types) diagnostics singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
|
@ -78,7 +78,7 @@ in {
|
|||
enable = mkEnableOption "SQL LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "SQL LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf package;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
||||
inherit (lib.types) enum package;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
|
@ -90,7 +90,7 @@ in {
|
|||
enable = mkEnableOption "Svelte LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Svelte LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.types) singleOrListOf;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
cfg = config.vim.languages.tailwind;
|
||||
|
@ -154,7 +155,7 @@ in {
|
|||
enable = mkEnableOption "Tailwindcss LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Tailwindcss LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf package bool;
|
||||
inherit (lib.types) enum package bool;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics mkPluginSetupOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics mkPluginSetupOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAnywhere entryBefore;
|
||||
|
||||
cfg = config.vim.languages.ts;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
inherit (lib.types) nullOr enum attrsOf listOf package str;
|
||||
inherit (lib.attrsets) attrNames;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption singleOrListOf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
@ -114,7 +114,7 @@ in {
|
|||
enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Typst LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
|
@ -73,7 +73,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Vala LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Vala LSP server to use";
|
||||
};
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -37,7 +37,7 @@ in {
|
|||
enable = mkEnableOption "WGSL LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "WGSL LSP server to use";
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.yaml;
|
||||
|
@ -56,7 +56,7 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Yaml LSP support" // {default = config.vim.lsp.enable;};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Yaml LSP server to use";
|
||||
};
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkDefault;
|
||||
inherit (lib.types) bool listOf package enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.types) bool package enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
|
@ -67,7 +67,7 @@ in {
|
|||
enable = mkEnableOption "Zig LSP support" // {default = config.vim.lsp.enable;};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
type = singleOrListOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Zig LSP server to use";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue