regal icon indicating copy to clipboard operation
regal copied to clipboard

lsp/completions: Snippets for built-in functions

Open charlieegan3 opened this issue 1 year ago • 1 comments

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 avatar Jul 15 '24 15:07 charlieegan3

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 🙂

anderseknert avatar Jul 15 '24 20:07 anderseknert