blob: 197f51f82ea2dafdc0eea4bf172ecce861021aa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.types) mkLspPresetEnableOption;
inherit (lib.meta) getExe';
cfg = config.vim.lsp.presets.typescript-go;
in {
options.vim.lsp.presets.typescript-go = {
enable = mkLspPresetEnableOption {
option = "typescript-go";
display = "TypeScript Go";
extra = "Experimental.";
};
};
config = mkIf cfg.enable {
vim.lsp.servers.typescript-go = {
enable = true;
cmd = [(getExe' pkgs.typescript-go "tsgo") "--lsp" "--stdio"];
root_markers = [".git" "tsconfig.json" "package.json"];
};
};
}
|