feat: Automatic LSP configuration for Copilot CLI (#74)#84
Merged
GordonBeeming merged 2 commits intomainfrom Mar 24, 2026
Merged
feat: Automatic LSP configuration for Copilot CLI (#74)#84GordonBeeming merged 2 commits intomainfrom
GordonBeeming merged 2 commits intomainfrom
Conversation
Automatically configure Language Server Protocol (LSP) servers in container images so Copilot CLI gets code intelligence out of the box. - Add lsp-typescript snippet: installs typescript-language-server for all images - Add lsp-csharp snippet: installs csharp-ls for dotnet images with .NET 10 SDK (csharp-ls v0.22.0 only ships net10.0 TFM, so dotnet-8/9 excluded) - Add lsp-rust snippet: adds rust-analyzer via rustup for rust images - Add lsp-golang snippet: installs gopls for golang images - Each snippet writes a config fragment to /etc/copilot/lsp-config.d/ - Entrypoint merges fragments into ~/.copilot/lsp-config.json at startup (skipped if user provides their own) - Update images.json and regenerate all Dockerfiles Closes #74 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automatic, image-baked LSP server configuration for GitHub Copilot CLI by installing language servers in relevant container images and generating a unified ~/.copilot/lsp-config.json at container startup from drop-in fragments.
Changes:
- Add Docker snippet(s) to install LSP servers (TypeScript, Rust, Go, C#) and write per-language config fragments to
/etc/copilot/lsp-config.d/. - Update the container entrypoint to merge fragment JSON files into
~/.copilot/lsp-config.jsonwhen the user hasn’t provided their own. - Update
docker/images.jsonto include the new snippets across image variants and regenerate Dockerfiles.
Reviewed changes
Copilot reviewed 7 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docker/snippets/lsp-typescript.Dockerfile | Installs TypeScript LSP and writes TypeScript LSP config fragment. |
| docker/snippets/lsp-rust.Dockerfile | Installs Rust Analyzer and writes Rust LSP config fragment. |
| docker/snippets/lsp-golang.Dockerfile | Installs gopls and writes Go LSP config fragment. |
| docker/snippets/lsp-csharp.Dockerfile | Installs csharp-ls and writes C# LSP config fragment. |
| docker/shared/entrypoint.sh | Merges /etc/copilot/lsp-config.d/*.json into ~/.copilot/lsp-config.json on startup if not user-provided. |
| docker/images.json | Adds LSP snippets to the relevant image definitions so they’re included in generated Dockerfiles. |
| docker/generated/Dockerfile.default | Regenerated to include TypeScript LSP snippet. |
| docker/generated/Dockerfile.playwright | Regenerated to include TypeScript LSP snippet. |
| docker/generated/Dockerfile.dotnet | Regenerated to include TypeScript + C# LSP snippets. |
| docker/generated/Dockerfile.dotnet-8 | Regenerated to include TypeScript LSP snippet. |
| docker/generated/Dockerfile.dotnet-9 | Regenerated to include TypeScript LSP snippet. |
| docker/generated/Dockerfile.dotnet-10 | Regenerated to include TypeScript + C# LSP snippets. |
| docker/generated/Dockerfile.golang | Regenerated to include TypeScript + Go LSP snippets. |
| docker/generated/Dockerfile.rust | Regenerated to include TypeScript + Rust LSP snippets. |
| docker/generated/Dockerfile.dotnet-playwright | Regenerated to include TypeScript + C# LSP snippets. |
| docker/generated/Dockerfile.dotnet-rust | Regenerated to include TypeScript + C# + Rust LSP snippets. |
| .github/copilot-instructions.md | Updates versioning instructions to reflect deriving CopilotHereVersion from VERSION and adds bump script guidance. |
Address PR review feedback: - Add ARG for typescript, typescript-language-server versions (default: latest) - Add ARG for csharp-ls version (default: latest) - Add ARG for gopls version (default: latest) - Use --tool-path for csharp-ls instead of -g + symlink - Add try/catch per LSP config fragment in entrypoint to prevent malformed JSON from bricking container startup - Regenerate all Dockerfiles Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatically configure Language Server Protocol (LSP) servers in container
images so Copilot CLI gets code intelligence out of the box.
(csharp-ls v0.22.0 only ships net10.0 TFM, so dotnet-8/9 excluded)
(skipped if user provides their own)
Closes #74
Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
Co-authored-by: GitButler gitbutler@gitbutler.com