Completes the read-only LSP feature set (everything except edits). Same request→store→Lua pattern as the nav batch; these three need new parsing (new response shapes), so they were deliberately split from the Location-family PR (#16). - src/symbol.rs: one flat Symbol type for both symbol requests. from_lsp_value handles BOTH LSP shapes — hierarchical DocumentSymbol[] (flattened with depth + parent chain) and flat SymbolInformation[]/WorkspaceSymbol[] (location.uri, range optional for WorkspaceSymbol). Scope-keyed (Document(uri) vs Workspace(query)) so an outline and a query don't collide. - src/document_highlight.rs: range + DocumentHighlightKind (absent defaults to Text=1 per spec), (server,uri)-keyed. - lsp.rs: three ResponseRoute variants + absorb arms + request methods. documentSymbol/documentHighlight ranges convert via the requested-doc codec; workspace/symbol results are cross-file → route uri "" → non-destructive passthrough (same rule as cross-file definition). - Lua: raw bindings + pmacs.document_symbol / .workspace_symbol / .document_highlight read surfaces (the new LSP Symbol is aliased to avoid the pre-existing project_index::Symbol name clash); lsp.lua wrappers + an lsp.document-symbols command on C-c o (modeline summary; outline buffer is future UX). - Tests: 6 parser unit tests (hierarchical depth/parent, flat SymbolInformation, range-less WorkspaceSymbol, highlight kind default, scope non-collision) + an e2e driving all three through the async bridge asserting shape correctness. Also includes a pre-existing rustfmt normalization of the #15 semantic-frontend files (protocol.rs / semantic_client.rs / semantic_render.rs) — main was not rustfmt-clean there after the #15 merge; bundled here per operator decision so the fmt gate is green. Gate: fmt clean; clippy --all-targets -D warnings clean; lib 1257/0; m4_acceptance 66/0; m9_1 18/0; m8_1/m8_9/m8_10 green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| async.lua | ||
| fs.lua | ||
| lsp.lua | ||
| mcp.lua | ||
| syntax.lua | ||