Add semantic tokens for local Modelica classes and types - #97
Merged
Merged
Conversation
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>
Resolve the README conflict by retaining semantic highlighting test instructions and the merged OMEdit client compatibility documentation. Co-authored-by: JKRT <jtinnerholm@gmail.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is JKRT_AGENTIC_ACCOUNT.
Class declarations, locally resolved class/type references, and matching
endnames now receive semantic tokens. For example, both occurrences ofMyModelinmodel 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.enabledcontrol 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.