usethesource / rascal-language-servers

An LSP server for Rascal which includes an easy-to-use LSP generator for languages implemented in Rascal, and an interactive terminal REPL.
BSD 2-Clause "Simplified" License
11 stars 7 forks source link

Textmate grammar does not handle more than one location on a single line #432

Open rodinaarssen opened 1 month ago

rodinaarssen commented 1 month ago

Describe the bug

The Textmate grammar breaks Rascal's syntax highlighting if more than one location literal with three consecutive slashes appear "consecutively" (i.e., without a location literal with just two consecutive slashes in-between).

To Reproduce

Steps to reproduce the behavior: image Note that from the second slash in the second literal

Desktop (please complete the following information):

sungshik commented 1 week ago

Thank you for reporting. Here's what happens:

DavyLandman commented 1 week ago

It looks like we should be opening an issue on microsoft/vscode repo about this interaction bteween the textmate & the semantic tokens. Or not @sungshik ? as #431 also gets triggered sometimes, and appears to fall in the same category.

sungshik commented 1 week ago

I agree. I think the matching+highlighting of brackets in comments in the current release of the extension (i.e., before TextMate) is a symptom of the same issue. E.g., the purple brackets of (c) on line 2 in this screenshot:

image

Do you know if anyone looked into this before? #214 seems related (but not exactly the same).

DavyLandman commented 1 week ago

I've briefly looked into the brackets to see that there didn't seem to be a nice way to control where it shouldn't be active.

sungshik commented 1 week ago

Ok, issue submitted.