Skip to content

feat: add lsp_defs/refs to all schemas + Rust/Terraform presets#82

Merged
jamestexas merged 2 commits intomainfrom
feat/lsp-defs-refs-all-langs
Mar 12, 2026
Merged

feat: add lsp_defs/refs to all schemas + Rust/Terraform presets#82
jamestexas merged 2 commits intomainfrom
feat/lsp-defs-refs-all-langs

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

Summary

  • Add lsp_defs (definitions) and lsp_refs (references) content sources to the lsp file_set across all language schemas, completing the LSP materialization story alongside existing hover and diagnostics
  • Create Rust preset schema (10 construct types: functions, structs, enums, traits, implementations, type_aliases, constants, statics, modules, macros) with proper selectors including impl_item type: for impl blocks
  • Create Terraform/HCL preset schema (7 construct types: resources, data, variables, outputs, modules, locals, providers) using #eq? predicates to distinguish block types
  • Register both presets in sourceCodePresets and presetSchemas so auto-detection uses them instead of FCA inference
  • Fix serve --schema to use resolveSchema() for preset name support (was calling os.ReadFile directly)

Test plan

  • task test β€” all existing tests pass including TestResolveSchema_AllPresets (rust + terraform)
  • TestSourceCodePresets_SubsetOfPresetSchemas validates all preset keys resolve
  • E2E: mache serve on ley-line/rs with Rust preset β€” 791 functions, 52 structs, 15 enums, 2 traits, 50 implementations verified via MCP tools
  • E2E: Terraform schema against real .tf files β€” validate #eq? predicates
  • E2E: leyline lsp enrichment β†’ verify definitions/references files materialize

πŸ€– Generated with Claude Code

jamestexas and others added 2 commits March 11, 2026 21:25
Complete the LSP materialization story: add definitions and references
content sources alongside existing hover and diagnostics. Create preset
schemas for Rust (10 construct types) and Terraform/HCL (7 construct
types) so they use structured trees instead of FCA inference fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The serve command was calling os.ReadFile directly on the --schema value,
bypassing preset lookup. Now uses resolveSchema() which checks presets
first, matching the behavior of the config system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jamestexas jamestexas merged commit 4fcf4de into main Mar 12, 2026
13 checks passed
@jamestexas jamestexas deleted the feat/lsp-defs-refs-all-langs branch March 12, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant