-
Notifications
You must be signed in to change notification settings - Fork 121
Add semantic highlighting for type names after 'Новый' keyword #3716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
… 'Новый' keyword Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Test Results 2 799 files + 9 2 799 suites +9 48m 53s ⏱️ - 2m 5s Results for commit 0a5ce3f. ± Comparison against base commit 11a5848. This pull request removes 8 and adds 9 tests. Note that renamed tests count towards both. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds semantic highlighting for type names following the Новый/New keyword in constructor expressions and introduces a reusable test helper to improve test maintainability across semantic token tests.
- Implements
NewExpressionSemanticTokensSupplierto highlight type names inНовый ТипИмя()expressions asSemanticTokenTypes.Type - Introduces
SemanticTokensTestHelperwith utilities for decoding and asserting semantic tokens in tests - Refactors existing semantic token tests to use the new helper, improving consistency and reducing boilerplate
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| NewExpressionSemanticTokensSupplier.java | Implements the semantic token supplier for highlighting type names after the Новый/New keyword |
| NewExpressionSemanticTokensSupplierTest.java | Comprehensive test coverage for the new supplier including Russian/English syntax and edge cases |
| SemanticTokensTestHelper.java | New test utility class providing token decoding and assertion methods |
| SymbolsSemanticTokensSupplierTest.java | Refactored to use the new test helper, removing manual token filtering |
| PreprocessorSemanticTokensSupplierTest.java | Refactored with explicit expected token assertions using the helper |
| ModuleReferenceSemanticTokensSupplierTest.java | Updated to extend AbstractServerContextAwareTest and use the helper |
| MethodCallSemanticTokensSupplierTest.java | Simplified using the test helper with clear expected token definitions |
| LexicalSemanticTokensSupplierTest.java | Refactored with more precise assertions using the helper |
| CommentSemanticTokensSupplierTest.java | Improved test clarity with explicit expected token lists |
| BslDocSemanticTokensSupplierTest.java | Refactored to use helper methods for cleaner assertions |
| AnnotationSemanticTokensSupplierTest.java | Simplified test assertions using the new helper patterns |
|



Type names following the
Новый/Newkeyword were not receiving semantic token highlighting. This adds type highlighting for constructor expressions.Changes
NewExpressionSemanticTokensSupplierthat findsnewExpressionAST nodes and emitsSemanticTokenTypes.Typefor the type nameExample
Note: The
Новый("TypeName")syntax where the type is passed as a string literal is intentionally not highlighted, as that's a string argument rather than a type identifier.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.