mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-15 00:58:37 +00:00
fixup! lib/languages: add explicit enable to LSP submodule
This commit is contained in:
parent
0f6518853e
commit
e4be20d7dd
1 changed files with 13 additions and 9 deletions
|
@ -1,11 +1,11 @@
|
||||||
{lib}: let
|
{lib}: let
|
||||||
inherit (builtins) isString getAttr;
|
inherit (builtins) isString getAttr;
|
||||||
inherit (lib.options) mkOption;
|
inherit (lib.options) mkOption;
|
||||||
inherit (lib.types) listOf bool str submodule;
|
inherit (lib.types) listOf bool str submodule attrsOf anything either nullOr;
|
||||||
inherit (lib.generators) mkLuaInline;
|
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
inherit (lib.nvim.types) luaInline;
|
inherit (lib.nvim.types) luaInline;
|
||||||
in {
|
in {
|
||||||
|
# TODO: remove
|
||||||
diagnosticsToLua = {
|
diagnosticsToLua = {
|
||||||
lang,
|
lang,
|
||||||
config,
|
config,
|
||||||
|
@ -35,6 +35,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
lspOptions = submodule {
|
lspOptions = submodule {
|
||||||
|
freeformType = attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
|
@ -43,29 +44,32 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
capabilities = mkOption {
|
capabilities = mkOption {
|
||||||
type = luaInline;
|
type = nullOr (either luaInline (attrsOf anything));
|
||||||
default = mkLuaInline "capabilities";
|
default = null;
|
||||||
description = "LSP capabilitiess to pass to lspconfig";
|
description = "LSP capabilitiess to pass to lspconfig";
|
||||||
};
|
};
|
||||||
|
|
||||||
on_attach = mkOption {
|
on_attach = mkOption {
|
||||||
type = luaInline;
|
type = nullOr luaInline;
|
||||||
default = mkLuaInline "default_on_attach";
|
default = null;
|
||||||
description = "Function to execute when an LSP server attaches to a buffer";
|
description = "Function to execute when an LSP server attaches to a buffer";
|
||||||
};
|
};
|
||||||
|
|
||||||
filetypes = mkOption {
|
filetypes = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
description = "Filetypes to auto-attach LSP in";
|
description = "Filetypes to auto-attach LSP in";
|
||||||
};
|
};
|
||||||
|
|
||||||
cmd = mkOption {
|
cmd = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
description = "Command used to start the LSP server";
|
description = "Command used to start the LSP server";
|
||||||
};
|
};
|
||||||
|
|
||||||
root_markers = mkOption {
|
root_markers = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
"root markers" used to determine the root directory of the workspace, and
|
"root markers" used to determine the root directory of the workspace, and
|
||||||
the filetypes associated with this LSP server.
|
the filetypes associated with this LSP server.
|
||||||
|
|
Loading…
Add table
Reference in a new issue