Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9415189

Browse files
committed
feat: add Go LSP configuration and code navigation documentation
Change-Id: I994c8ee8fa2c246808a9f68a86e83a6a3db6f8ac Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent f46d478 commit 9415189

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

CLAUDE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,50 @@ if errors.Is(err, errInvalidPKCE) {
270270
- Test both positive and negative cases
271271
- Use `testutil.WaitLong` for timeouts in tests
272272

273+
## Code Navigation and Investigation
274+
275+
### Using Go LSP Tools
276+
277+
When working with the Coder codebase, leverage Go Language Server Protocol tools for efficient code navigation:
278+
279+
1. **Find function definitions**:
280+
281+
```
282+
mcp__go-language-server__definition symbolName
283+
```
284+
285+
- Example: `mcp__go-language-server__definition getOAuth2ProviderAppAuthorize`
286+
- Quickly jump to function implementations across packages
287+
288+
2. **Find symbol references**:
289+
290+
```
291+
mcp__go-language-server__references symbolName
292+
```
293+
294+
- Locate all usages of functions, types, or variables
295+
- Understand code dependencies and call patterns
296+
297+
3. **Get symbol information**:
298+
299+
```
300+
mcp__go-language-server__hover filePath line column
301+
```
302+
303+
- Get type information and documentation at specific positions
304+
305+
4. **When to use LSP vs other tools**:
306+
- **Use LSP for**: Following function calls, understanding package relationships, finding specific implementations
307+
- **Use Grep for**: Text-based searches, finding patterns across files
308+
- **Use Bash for**: Simple file operations, running tests, git commands
309+
310+
### Investigation Strategy
311+
312+
1. **Start with route registration** in `coderd/coderd.go` to understand API endpoints
313+
2. **Use LSP definition lookup** to trace from route handlers to actual implementations
314+
3. **Follow the middleware chain** to understand request processing flow
315+
4. **Check test files** for expected behavior and error patterns
316+
273317
## Testing Scripts
274318
275319
### OAuth2 Test Scripts

0 commit comments

Comments
 (0)