refactor(lsp): consolidate LSP tools - remove lsp_hover, lsp_code_actions, lsp_code_action_resolve - merge lsp_document_symbols + lsp_workspace_symbols into lsp_symbols with scope parameter - update all references in hooks, templates, and documentation

This commit is contained in:
justsisyphus
2026-01-14 17:30:04 +09:00
parent 0cfce83a63
commit 72fa8f2c65
12 changed files with 70 additions and 217 deletions
@@ -117,13 +117,13 @@ If \`--create-new\`: Read all existing first (preserve context) → then delete
lsp_servers() # Check availability
# Entry points (parallel)
lsp_document_symbols(filePath="src/index.ts")
lsp_document_symbols(filePath="main.py")
lsp_symbols(filePath="src/index.ts", scope="document")
lsp_symbols(filePath="main.py", scope="document")
# Key symbols (parallel)
lsp_workspace_symbols(filePath=".", query="class")
lsp_workspace_symbols(filePath=".", query="interface")
lsp_workspace_symbols(filePath=".", query="function")
lsp_symbols(filePath=".", scope="workspace", query="class")
lsp_symbols(filePath=".", scope="workspace", query="interface")
lsp_symbols(filePath=".", scope="workspace", query="function")
# Centrality for top exports
lsp_find_references(filePath="...", line=X, character=Y)
@@ -148,20 +148,15 @@ While background agents are running, use direct tools:
### LSP Tools for Precise Analysis:
\`\`\`typescript
// Get symbol information at target location
lsp_hover(filePath, line, character) // Type info, docs, signatures
// Find definition(s)
lsp_goto_definition(filePath, line, character) // Where is it defined?
// Find ALL usages across workspace
lsp_find_references(filePath, line, character, includeDeclaration=true)
// Get file structure
lsp_document_symbols(filePath) // Hierarchical outline
// Search symbols by name
lsp_workspace_symbols(filePath, query="[target_symbol]")
// Get file structure (scope='document') or search symbols (scope='workspace')
lsp_symbols(filePath, scope="document") // Hierarchical outline
lsp_symbols(filePath, scope="workspace", query="[target_symbol]") // Search by name
// Get current diagnostics
lsp_diagnostics(filePath) // Errors, warnings before we start
@@ -593,7 +588,7 @@ You already know these tools. Use them intelligently:
## LSP Tools
Leverage the full LSP toolset (\`lsp_*\`) for precision analysis. Key patterns:
- **Understand before changing**: \`lsp_hover\`, \`lsp_goto_definition\` to grasp context
- **Understand before changing**: \`lsp_goto_definition\` to grasp context
- **Impact analysis**: \`lsp_find_references\` to map all usages before modification
- **Safe refactoring**: \`lsp_prepare_rename\`\`lsp_rename\` for symbol renames
- **Continuous verification**: \`lsp_diagnostics\` after every change