You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Core Philosophy:** Deep modules with simple interfaces (John Ousterhout's "A Philosophy of Software Design")
17
17
18
+
## LSP-Based Codebase Navigation
19
+
20
+
**IMPORTANT:** When an LSP (Language Server Protocol) MCP server is available (such as `rust-analyzer`), **ALWAYS prefer LSP tools over text-based search** for code navigation and analysis.
21
+
22
+
### When to Use LSP Tools
23
+
24
+
Use LSP tools for:
25
+
-**Finding definitions:**`get_symbol_definitions` instead of grepping for function/type names
26
+
-**Finding references:**`get_symbol_references` instead of searching for usage
27
+
-**Type information:**`get_hover` for accurate type and documentation
28
+
-**Code structure:**`get_symbols` for understanding module organization
29
+
-**Implementations:**`get_implementations` for finding trait implementations
30
+
-**Call hierarchy:**`get_call_hierarchy` for understanding call relationships
31
+
-**Diagnostics:**`get_diagnostics` for compiler errors and warnings
32
+
-**Completions:**`get_completions` for valid code suggestions
33
+
34
+
### Why LSP Over Text Search
35
+
36
+
**LSP Advantages:**
37
+
-**Semantic understanding:** Knows about scopes, types, and language semantics
38
+
-**Accurate references:** Distinguishes between `Result` (std) vs `Result` (custom type)
39
+
-**Cross-file navigation:** Follows imports and module boundaries correctly
0 commit comments