scalameta / metals-vscode

Visual Studio Code extension for Metals
https://marketplace.visualstudio.com/items?itemName=scalameta.metals#overview
Apache License 2.0
298 stars 75 forks source link

Code Highlighting broken if the word `schema` is used in s-string #1397

Closed BalduinLandolt closed 1 year ago

BalduinLandolt commented 1 year ago

Describe the bug

Code highlighting is broken if an s-string contains the word "schema".

To Reproduce Steps to reproduce the behavior:

  1. create any scala file
  2. add scala code
  3. add an s-string with the word "schema" (case sensitive!) in it
  4. look at syntax highlighting after the s-string containing "schema"

Expected behavior

A string should be able to contain any word (ignoring special characters like quotation mark or backslash)

Screenshots

all ok with "Schema" (upper case)

image

broken highlighting with "schema" (lower case)

image

Installation:

Additional context

Search terms

tgodzik commented 1 year ago

Thanks for reporting! I am unable to reproduce your issue:

Screenshot from 2023-06-19 15-25-37

could this be caused by another extension? Are you using semantic highlighting?

BalduinLandolt commented 1 year ago

hm... must have been an extension conflict indeed. I created a separate profile with only scala-related and general purpose extensions, and now it's gone. Very weird, though, because none of my extensions should have caused this.
In any case, sorry for the false alarm. I'll close this.

tgodzik commented 1 year ago

hm... must have been an extension conflict indeed. I created a separate profile with only scala-related and general purpose extensions, and now it's gone. Very weird, though, because none of my extensions should have caused this. In any case, sorry for the false alarm. I'll close this.

No worries! It's really curious why this happens, let us know if you ever figure it out!