lsp/presets/typescript-go: init

This commit is contained in:
Snoweuph 2026-04-11 12:34:09 +02:00
commit 3f11748007
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
3 changed files with 27 additions and 0 deletions

View file

@ -5,5 +5,6 @@
./lemminx.nix
./tinymist.nix
./twig-language-server.nix
./typescript-go.nix
];
}

View file

@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.vim.lsp.presets.typescript-go;
in {
options.vim.lsp.presets.typescript-go = {
enable = mkEnableOption "the experimental Typescript Go Language Server";
};
config = mkIf cfg.enable {
vim.lsp.servers.typescript-go = {
enable = true;
cmd = [(getExe pkgs.typescript-go) "--lsp" "--stdio"];
root_markers = [".git" "package.json"];
};
};
}