Skip to content

Add semantic tokens for local Modelica classes and types - #97

Merged
JKRT merged 2 commits into
OpenModelica:mainfrom
SVAGEN26:feat/semantic-tokens
Sep 25, 2026
Merged

JKRT merged 2 commits into
OpenModelica:mainfrom
SVAGEN26:feat/semantic-tokens

Conversation

@SVAGEN26

Copy link
Copy Markdown
Contributor

This is JKRT_AGENTIC_ACCOUNT.

Class declarations, locally resolved class/type references, and matching end names now receive semantic tokens. For example, both occurrences of MyModel in model MyModel ... end MyModel; use the same class classification. Packages, records, functions, types and enumerations use standard LSP token types.

The provider shares current-document symbol resolution with document highlights, uses unsaved text, releases temporary syntax trees and performs no library loading. Unknown external/imported/inherited names retain ordinary syntax highlighting. This implements full-document responses; range and delta requests are not advertised. VS Code themes and editor.semanticHighlighting.enabled control rendering.

Validation: compilation and lint pass; 253 server tests pass, including protocol tests for incremental edits and no library loading. The 15 editor tests pass in VS Code 1.139.0 both without MetaModelica and with MetaModelica 1.6.1. The coexistence test checks grammar availability and semantic token results, not theme-specific pixel colors. README documents behavior and reproducible coexistence testing.

Closes #12.

Implement full semantic token requests for OpenModelica#12 using shared local symbol resolution. Classify declarations, references and matching end names from unsaved documents without loading libraries. Add server, protocol and VS Code tests, including MetaModelica coexistence coverage.

Co-authored-by: JKRT <jtinnerholm@gmail.com>
@SVAGEN26 SVAGEN26 mentioned this pull request Sep 24, 2026
3 tasks
Resolve the README conflict by retaining semantic highlighting test instructions and the merged OMEdit client compatibility documentation.

Co-authored-by: JKRT <jtinnerholm@gmail.com>
@SVAGEN26

Copy link
Copy Markdown
Contributor Author

Following our discussion, merged main and resolved the README conflict in d60263a. Kept both the semantic highlighting test instructions and the OMEdit client compatibility section added by #98, so neither set of documentation is lost. Conflict-marker and whitespace checks pass.

@JKRT
JKRT merged commit e0ff71e into OpenModelica:main Sep 25, 2026
9 checks passed
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.

Implement Semantic Tokens

2 participants