kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
12.66k stars 1.08k forks source link

Extend Autocompletion with task and taskrun expressions and the root available variables #3622

Open brian-mulier-p opened 6 months ago

brian-mulier-p commented 6 months ago

As a follow-up to https://github.com/kestra-io/kestra/issues/3331 we can extend autocompletion.

In the order of priority

Prio 1 - DONE

Add autocompletion for root attributes when in an empty Pebble

you type {{ and then cmd+Space will give you:

Prio 2

Out of scope for now

Those can be explored later if time is available

Prio 3

Prio 4

Context aware:

iamviqar commented 3 weeks ago

@anna-geller @brian-mulier-p I would like to work on this .

Are we targeting Prio 2 as part of this task?

anna-geller commented 3 weeks ago

The Prio 2 only has an EE feature, so maybe you can focus on Prio 3? :)

iamviqar commented 3 weeks ago

Sure @anna-geller , can you please elaborate these requirements

Prio 3

  1. Add autocompletion for Pebble functions when we're in Pebble {{...}} and there's a word ahead of the cursor
  2. Add autocompletion for Pebble filters when we type "|" inside Pebble
  3. Add autocompletion for plugin defaults
anna-geller commented 3 weeks ago

I have a feeling this might be too complex for new contributors

  1. if you start typing a pebble function, you could get autocompletion for it https://kestra.io/docs/expressions/function -- this one is not super relevant so you can skip
  2. same for filters https://kestra.io/docs/expressions/filter
  3. autocompletion for https://kestra.io/docs/workflow-components/plugin-defaults
iamviqar commented 2 weeks ago

I have a feeling this might be too complex for new contributors

  1. if you start typing a pebble function, you could get autocompletion for it https://kestra.io/docs/expressions/function -- this one is not super relevant so you can skip
  2. same for filters https://kestra.io/docs/expressions/filter
  3. autocompletion for https://kestra.io/docs/workflow-components/plugin-defaults

Thank you, @anna-geller for the details. I'm currently focused on #2197 and would like to take on this task once I've finished it.