github-copilot-cli: add lsp server support

This commit is contained in:
Austin Horstman
2026-05-01 12:17:18 -05:00
parent feda41500e
commit edf3f59954
5 changed files with 140 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
{
github-copilot-cli-config = ./config.nix;
github-copilot-cli-directories = ./directories.nix;
github-copilot-cli-lsp = ./lsp.nix;
github-copilot-cli-mcp = ./mcp.nix;
github-copilot-cli-mcp-integration = ./mcp-integration.nix;
github-copilot-cli-path-not-directory = ./path-not-directory.nix;

View File

@@ -0,0 +1,32 @@
{
"lspServers": {
"python": {
"args": [
"--stdio"
],
"command": "pyright-langserver",
"env": {
"PYTHONPATH": "${PYTHONPATH:-}"
},
"fileExtensions": {
".py": "python",
".pyi": "python",
".pyw": "python"
},
"requestTimeoutMs": 120000,
"rootUri": "backend"
},
"typescript": {
"args": [
"--stdio"
],
"command": "typescript-language-server",
"fileExtensions": {
".js": "javascript",
".jsx": "javascriptreact",
".ts": "typescript",
".tsx": "typescriptreact"
}
}
}
}

View File

@@ -0,0 +1,38 @@
{
programs.github-copilot-cli = {
enable = true;
lspServers = {
typescript = {
command = "typescript-language-server";
args = [ "--stdio" ];
fileExtensions = {
".ts" = "typescript";
".tsx" = "typescriptreact";
".js" = "javascript";
".jsx" = "javascriptreact";
};
};
python = {
command = "pyright-langserver";
args = [ "--stdio" ];
fileExtensions = {
".py" = "python";
".pyw" = "python";
".pyi" = "python";
};
env = {
PYTHONPATH = "\${PYTHONPATH:-}";
};
rootUri = "backend";
requestTimeoutMs = 120000;
};
};
};
nmt.script = ''
assertFileExists home-files/.copilot/lsp-config.json
assertFileContent home-files/.copilot/lsp-config.json ${./expected-lsp-config.json}
assertPathNotExists home-files/.copilot/config.json
assertPathNotExists home-files/.copilot/mcp-config.json
'';
}