Skip to content

feat: add go-to-definition, document symbols, and reference completions for CDL v1.3 - #1

Merged
Bissbert merged 1 commit into
mainfrom
feature/cdl-v1.3
Feb 14, 2026
Merged

Bissbert merged 1 commit into
mainfrom
feature/cdl-v1.3

Conversation

@Bissbert

Copy link
Copy Markdown
Contributor

Summary

  • Go-to-definition for $name references (jumps to @name definition)
  • Document symbols for @name definitions (visible in outline/breadcrumbs)
  • Completion suggestions after $ prefix (lists all defined names)
  • Formatting support for definition lines (@name = ...)
  • 40 new tests (225 total)

Files changed

  • src/cdl_lsp/constants.py - new constants
  • src/cdl_lsp/features/__init__.py - register new features
  • src/cdl_lsp/features/completion.py - REFERENCE context, $ completions
  • src/cdl_lsp/features/definition.py - go-to-definition for $refs
  • src/cdl_lsp/features/diagnostics.py - definition/reference diagnostics
  • src/cdl_lsp/features/document_symbols.py - @def symbols
  • src/cdl_lsp/features/formatting.py - definition line formatting
  • src/cdl_lsp/server.py - register new handlers
  • tests/test_definitions_and_references.py - 40 new tests

Dependencies

  • Requires gemmology-cdl-parser >= 1.3.0 (PR: gemmology-dev/cdl-parser#)

Test plan

  • pytest passes all 225 tests
  • Go-to-definition navigates from $name to @name declaration
  • Document symbols show all @name definitions
  • $ triggers completion with defined names
  • Formatting preserves definition line structure
  • Diagnostics flag undefined $references and unused @definitions

…ns for CDL v1.3

LSP support for CDL v1.3 named references. Go-to-definition for $name
references, document symbols for @name definitions, completion
suggestions after $, formatting for definition lines. 40 new tests
(225 total).
@Bissbert
Bissbert merged commit a0bf35a into main Feb 14, 2026
4 of 6 checks passed
@Bissbert
Bissbert deleted the feature/cdl-v1.3 branch February 14, 2026 16:59
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