mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 12:09:19 +00:00
github-copilot-cli: add lsp server support
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
38
tests/modules/programs/github-copilot-cli/lsp.nix
Normal file
38
tests/modules/programs/github-copilot-cli/lsp.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user