open-policy-agent / vscode-opa

An extension for VS Code which provides support for OPA and the Rego policy language
https://openpolicyagent.org
Apache License 2.0
113 stars 31 forks source link

Keywords following `if` not highlighted #182

Open anderseknert opened 6 months ago

anderseknert commented 6 months ago

While both some and every are keywords, they aren't highlighted when directly following an if.

Screenshot 2024-05-26 at 22 35 37

Perhaps it's more than what we could easily describe in static configuration, and semantic tokens would help here. Still filing this for tracking, whichever solution is the right one.

charlieegan3 commented 4 months ago

Some more examples:

In this example:

package mypackage

import rego.v1

rule1 if not input.something

rule2 if input.foo

else if input.bar

it looks ok in the playground

Screenshot 2024-07-15 at 09 56 43

but not in vscode:

image_360