Skip to content

Groovy highlight regex fix + types#291

Merged
krystian-panek-vmltech merged 2 commits intomainfrom
groovy-highlight-regex-fix
Feb 6, 2026
Merged

Groovy highlight regex fix + types#291
krystian-panek-vmltech merged 2 commits intomainfrom
groovy-highlight-regex-fix

Conversation

@krystian-panek-vmltech
Copy link
Collaborator

@krystian-panek-vmltech krystian-panek-vmltech commented Feb 6, 2026

fixes #289


export const DEFAULT_THEME_ID = 'acm-dark';

export function registerTheme(instance: Monaco) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future hook

Copy link
Contributor

Copilot AI left a 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 pull request improves Groovy syntax highlighting in the Monaco editor by adding support for Groovy's slashy string (regex literal) syntax and introducing a custom theme system. It addresses Monaco editor configuration for Groovy language features that differ from Java, particularly string handling and regex literals.

Changes:

  • Added custom theme registration with 'acm-dark' theme ID that extends 'vs-dark'
  • Enhanced Groovy syntax highlighting with slashy string regex detection and improved rule ordering
  • Reorganized tokenizer rules to prioritize Groovy-specific patterns over inherited Java patterns

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ui.frontend/src/utils/monaco/theme.ts Introduces registerTheme function and changes DEFAULT_THEME_ID from 'vs-dark' to 'acm-dark' for custom theme support
ui.frontend/src/utils/monaco/groovy/syntax.ts Adds slashy string regex detection, reorganizes tokenizer rules to prioritize Groovy patterns, and adds comprehensive inline comments
ui.frontend/src/components/CodeEditor.tsx Registers the custom theme before language-specific configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@krystian-panek-vmltech krystian-panek-vmltech merged commit 61aa1e6 into main Feb 6, 2026
1 check 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.

Syntax coloring in the editor breaks when using Regex

2 participants

Comments