LSP (Language Server Protocol) server configurations written to lsp-config.json inside programs.github-copilot-cli.configDir.
Each attribute defines a server entry under lspServers in the config file. Supported fields include:
command— command used to start the LSP serverargs— arguments passed to the commandfileExtensions— map of file extensions to language IDsenv— environment variables for the server processrootUri— server root directory relative to the Git rootinitializationOptions— custom startup optionsrequestTimeoutMs— request timeout in milliseconds
Language server packages are not installed automatically. Add them to home.packages when needed.
See https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-lsp-servers for the documentation.
Declarations
Type
attribute set of (JSON value)Default
{ }Example
{
typescript = {
command = "typescript-language-server";
args = [ "--stdio" ];
fileExtensions = {
".ts" = "typescript";
".tsx" = "typescriptreact";
".js" = "javascript";
".jsx" = "javascriptreact";
};
};
python = {
command = lib.getExe' pkgs.pyright "pyright-langserver";
args = [ "--stdio" ];
fileExtensions = {
".py" = "python";
".pyw" = "python";
".pyi" = "python";
};
};
}