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

Same icon used for rules and functions in completion list #895

Open
anderseknert opened this issue Jul 3, 2024 · 1 comment
Open

Same icon used for rules and functions in completion list #895

anderseknert opened this issue Jul 3, 2024 · 1 comment

Comments

@anderseknert
Copy link
Member

I thought we did this, but perhaps it got lost when translating the rulerefs provider to Rego.

Screenshot 2024-07-03 at 11 08 50

Looks like we're showing the "rule" (variable) icon for all symbols here. We should use the function type for functions, and perhaps use "reference to rule" and "reference to function" rather than the current "rule ref" text.

@anderseknert
Copy link
Member Author

Had a look at this and indeed, the rulerefs Rego provider is only ever handed the refs as strings, so there's no way it can determine which of them are rules, functions or whatnot. This also means that the metadata annotations that we'd previously use to show documentation for the refs when asked for no longer are there.

We've got all of this data in the (Go) caller, so it wouldn't be hard to pass it to the provider. It'll be a lot more data to process though, so when we do that we'll need to be careful about checking the overhead / penalty we'll get from doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: TODO
Development

No branches or pull requests

1 participant