Skip to content

Commit c01eb7a

Browse files
authored
Merge pull request #1234 from SDSLeon/lsp-config-readme
docs: add LSP server configuration guide to README
2 parents 1bc2c29 + c13a41d commit c01eb7a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,53 @@ Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premi
122122

123123
For more information about how to use the GitHub Copilot CLI, see [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli).
124124

125+
## 🔧 Configuring LSP Servers
126+
127+
GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature provides intelligent code features like go-to-definition, hover information, and diagnostics.
128+
129+
### Installing Language Servers
130+
131+
Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support:
132+
133+
```bash
134+
npm install -g typescript-language-server
135+
```
136+
137+
For other languages, install the corresponding LSP server and configure it following the same pattern shown below.
138+
139+
### Configuring LSP Servers
140+
141+
LSP servers are configured through a dedicated LSP configuration file. You can configure LSP servers at the user level or repository level:
142+
143+
**User-level configuration** (applies to all projects):
144+
Edit `~/.copilot/lsp-config.json`
145+
146+
**Repository-level configuration** (applies to specific project):
147+
Create `.github/lsp.json` in your repository root
148+
149+
Example configuration:
150+
151+
```json
152+
{
153+
"lspServers": {
154+
"typescript": {
155+
"command": "typescript-language-server",
156+
"args": ["--stdio"],
157+
"fileExtensions": {
158+
".ts": "typescript",
159+
".tsx": "typescript"
160+
}
161+
}
162+
}
163+
}
164+
```
165+
166+
### Viewing LSP Server Status
167+
168+
Check configured LSP servers using the `/lsp` command in an interactive session, or view your configuration files directly.
169+
170+
For more information, see the [changelog](./changelog.md).
171+
125172
## 📢 Feedback and Participation
126173

127174
We're excited to have you join us early in the Copilot CLI journey.

0 commit comments

Comments
 (0)