cucumber / language-server

Cucumber Language Server
MIT License
35 stars 20 forks source link

Print existing steps and step definitions #40

Open aslakhellesoy opened 2 years ago

aslakhellesoy commented 2 years ago

🤔 What's the problem you're trying to solve?

Get a list of all step definitions and steps that match these step definitions.

✨ What's your proposed solution?

List all the steps and step definitions:

npx @cucumber/language-server --list

* I have {int} cuke(s)   # features/step_definitions/foo.ts:43
  * I have 3 cukes       # features/a.feature:32
  * I have 1 cuke        # features/b.feature:12
* /I eat (\d+) cukes/    # features/step_definitions/foo.ts:15
  * I eat 3 cukes        # features/a.feature:11

⛏ Have you considered any alternatives or workarounds?

This is implemented in the usage formatter in various Cucumber implementations. By implementing it here we can remove this from all Cucumbers.