You can install Cucumber (Gherkin) Full Support extension from the VSCode Marketplace:

After the installation is finished, reload VSCode. Now in order to make it work for Ruby, you need to:

Press Ctrl +, to open User Settings

Scroll down to Cucumber Auto Complete

On the right side you need to modify these settings (you can find 2 examples of how to do this on the extension page). In my case, I added the following:

  "cucumberautocomplete.steps": [
      "features/step_definitions/*.rb"
  ],
  "cucumberautocomplete.syncfeatures": "features/*feature"


Reload VSCode

Open a .feature file and right-click any step, you should have to Go To Definition and Peek Definition working.

I hope you get it working!