-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Wrong comment character inserted for Shplait / Rhombus. #130
Comments
It doesn't look like VSCode supports non-declarative rules for the comment API. Maybe the extension could contribute a second language like |
Thanks for reporting the issue! I believe you're correct: I am not currently aware of non-declarative API to set the comment characters. (If anyone knows of a way, please let us know!) Yes, an extension can contribute multiple languages, so the Rhombus case could be handled... Ideally it could be programmatic, since as we know, Racket allows you to define essentially any language via It probably makes sense to special case Rhombus, even though it's unfortunate that it's necessary to do so. @TimWhiting, is there any way to identify Shplait files (e.g. by file extension)...? For Rhombus, I believe If there's no extension for Shplait, you could still override VS Code's language detection (per file or per project) to treat Shplait files as Rhombus (once we've added a Rhombus language). |
Shplait recommends using the .rhm extension as well. So it should work fine. |
Adding just the The harder part would be defining a grammar for Rhombus files so that syntax highlighting works correctly as well. Perhaps someone has done that work already...? I don't anticipate having time to do this work myself in short term, but I am happy to review PRs that contribute this feature. |
Environment
Error message
None
Additional context
When using languages with C style comments (Shplait / Rhombus) the racket extension does not insert the correct comment characters (i.e. // instead of ;).
To reproduce:
Install
Shplait
raco pkg install shplait
.Add
#lang shplait
. Type an expression like1 + 2
. TypeCtrl/Cmd + /
, it inserts;
instead of//
.The text was updated successfully, but these errors were encountered: