Skip to content
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

No syntax highlighting for entities #1

Open
gideongrinberg opened this issue Nov 9, 2020 · 1 comment
Open

No syntax highlighting for entities #1

gideongrinberg opened this issue Nov 9, 2020 · 1 comment

Comments

@gideongrinberg
Copy link

Essentially, it's what the title says. There is no syntax highlighting or Intellisense for entities.

Screen Shot 2020-11-09 at 9 19 36 AM

@Martinsos
Copy link
Member

Martinsos commented Nov 9, 2020

@Gideon357 thanks for reporting this!

You are right, unfortunately we didn't get that working properly yet.
I actually left a comment for it in the code, I will reference it here: https://github.com/wasp-lang/vscode-wasp/blob/main/syntaxes/wasp.tmLanguage.yaml#L45 .

The thing is, we are using prisma language extension on the {=psl psl=} block as embedded language (feature of VSCode), but what we have in PSL block actually isn't complete PSL declaration of entity -> it is missing start model Task { and end } because we moved those parts out into Wasp (entity Task).

Some possible solutions:

  • Implement our own highlighting of Prisma code, that takes into account that parts of model statement are missing. While this would work, we would be replicating logic that is already implement in Prisma VSCode extension, and probably works better.
  • Drop PSL and implement our own Entity syntax -> then we implement syntax highlighting for it.

Plan is to go with latter at some moment, so for now it probably makes most sense to not put additional effort into it and then once we have our own Entity syntax, we will implement proper highlighting support for it.

I will leave the issue open in case somebody has better ideas how to approach this, but will mark it as "wontfix" for now.

@Martinsos Martinsos added bug Something isn't working wontfix This will not be worked on labels Nov 9, 2020
@Martinsos Martinsos added status:icebox and removed wontfix This will not be worked on status:icebox bug Something isn't working labels Jul 27, 2023
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

No branches or pull requests

2 participants