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

lsp/completions: Snippets for built-in functions #916

Open
charlieegan3 opened this issue Jul 15, 2024 · 1 comment
Open

lsp/completions: Snippets for built-in functions #916

charlieegan3 opened this issue Jul 15, 2024 · 1 comment
Labels

Comments

@charlieegan3
Copy link
Member

Provide snippet completions for OPA built-in functions.

Similar to what we are providing for some, and every:

screenshot_2024-07-12_at_11 29 56.

Perhaps these could even be generated snippets?

@charlieegan3 charlieegan3 added the enhancement New feature or request label Jul 15, 2024
@anderseknert
Copy link
Member

anderseknert commented Jul 15, 2024

While I'm not against this, I think it could be made somewhat moot once we implement signature help.

With that flow enabled, a user would first type a few letters to see completion suggestions for functions, then once they've picked one see a tooltip for each argument after ( and each , until they'd reach )... suggesting the name and type of the argument, and whatever else we might want to display there.

OTOH, snippets are nice in how you can tab between the args, and then finally tab to the next location. But since signature help is a "standard feature" of the language server protocol, I think I'd prefer to have us implement that first, and then see if we still think snippets add value on top of that 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants