-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Consider adopting a new Groovy grammar #175329
Comments
Which language is being used for these files? If it is contributed by an extension I suggest you log the issue with the extension authors. |
I'm actually not sure if/which extension is coming into play. I think VS Code automatically downloaded a Groovy syntax processing extension. I tried to run with all extensions disabled and had the same issue, which seems odd because I would think there would be no syntax highlighting at that point, but there still was. |
What does the Language Mode panel on the left end of your status bar show? |
It shows "Groovy" |
@varnk can you share a code snippet to repro the issue with and a screenshot of the bad behavior you're seeing? |
Requested screen capture attached of a sample Jenkinsfile. I placed yellow arrows in the captured image to point out that the Language Mode is set to Groovy and also to point out the slashy string where the backslashes are showing as an escaped character color (in yellow). I am wondering if VS Code is assuming the string is a regex no matter the content. |
Thanks @varnk. This is the upstream issue textmate/groovy.tmbundle#15. https://github.com/textmate/groovy.tmbundle hasn't been updated in a long time. I'll repurpose this issue for finding a new groovy grammar. |
https://github.com/marlon407/code-groovy might be a good candidate. |
Looks like I was already tracking this in #145097 |
Type: Bug
If I have Groovy script that has a slashy string that contains backslashes, the code editor colorizes the backslashes as escaped characters. I am assuming that this is because slashy strings are being assumed to be regex expressions? However, I am using slashy strings for windows filenames, which use backslashes and it gets a little confusing when the editor shows the character following a backslash in a different color, which I am assuming it thinks is an as an escaped character.
VS Code version: Code 1.75.1 (441438a, 2023-02-08T21:32:34.589Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
Extensions (58)
(1 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: