You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As this will be one of the more common completion suggestions, I think it's worth spending some time making it perfect.
Currently both the if and contains completions require the user to type i or c respectively to show up. Since there isn't much else that can follow a rule name, we should just suggest them already after the first whitespace. This would also help people new to Rego know what's possible at that location, without having to know about if or contains. On that note — we should add some docs on both of those keywords to show up in the suggestions! So that you can learn as you type.
there isn't much else that can follow a rule name
The one (?) exception is of course :=, which we should also add a suggestion for, with an explanation that is the value returned by the rule if evaluation succeeds.
The text was updated successfully, but these errors were encountered:
anderseknert
changed the title
Completions: rule head (if, contains`, etc) improvements
Completions: rule head (if, contains, etc) improvements
Jun 8, 2024
As this will be one of the more common completion suggestions, I think it's worth spending some time making it perfect.
Currently both the
if
andcontains
completions require the user to typei
orc
respectively to show up. Since there isn't much else that can follow a rule name, we should just suggest them already after the first whitespace. This would also help people new to Rego know what's possible at that location, without having to know aboutif
orcontains
. On that note — we should add some docs on both of those keywords to show up in the suggestions! So that you can learn as you type.The one (?) exception is of course
:=
, which we should also add a suggestion for, with an explanation that is the value returned by the rule if evaluation succeeds.The text was updated successfully, but these errors were encountered: