Merge branch 'main' into feature-language-tex

This commit is contained in:
isaacST08 2025-05-03 15:51:37 -06:00
commit 8384e388c2
109 changed files with 2542 additions and 1349 deletions

View file

@ -1,10 +1,11 @@
# From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/booleans.nix
{lib}: let
inherit (builtins) isString getAttr;
inherit (lib.options) mkOption;
inherit (lib.types) bool;
inherit (lib.types) listOf bool str submodule attrsOf anything either nullOr;
inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (lib.nvim.types) luaInline;
in {
# TODO: remove
diagnosticsToLua = {
lang,
config,
@ -32,4 +33,48 @@ in {
type = bool;
description = "Turn on ${desc} for enabled languages by default";
};
lspOptions = submodule {
freeformType = attrsOf anything;
options = {
enable = mkOption {
type = bool;
default = true;
description = "Whether to enable this LSP server.";
};
capabilities = mkOption {
type = nullOr (either luaInline (attrsOf anything));
default = null;
description = "LSP capabilitiess to pass to lspconfig";
};
on_attach = mkOption {
type = nullOr luaInline;
default = null;
description = "Function to execute when an LSP server attaches to a buffer";
};
filetypes = mkOption {
type = nullOr (listOf str);
default = null;
description = "Filetypes to auto-attach LSP in";
};
cmd = mkOption {
type = nullOr (listOf str);
default = null;
description = "Command used to start the LSP server";
};
root_markers = mkOption {
type = nullOr (listOf str);
default = null;
description = ''
"root markers" used to determine the root directory of the workspace, and
the filetypes associated with this LSP server.
'';
};
};
};
}