alexkrechik / VSCucumberAutoComplete

Cucumber (Gherkin) Full Support Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete
MIT License
331 stars 79 forks source link

Unable to find steps with capture groups #501

Open josemigallas opened 2 weeks ago

josemigallas commented 2 weeks ago

VS Code 1.89.1 Cucumber (Gherkin) Full Support 3.0.5

Config:

    "cucumberautocomplete.steps": [
      "features/step_definitions/**/*.rb",
    ],
    "cucumberautocomplete.strictGherkinCompletion": true,
    "cucumberautocomplete.smartSnippets": true,
    "cucumberautocomplete.stepsInvariants": true,
    "cucumberautocomplete.syncfeatures": "features/**/*.feature",

It looks like the extension is unable to find regexp steps containing capture groups. Consider the following 2 examples:

Step definition:

When /^(?:|I |they )go to (.+)$/ do |page_name|
  # Not found
end

When /^pepe is here$/ do
  # Yes found
end

Feature:

Screenshot 2024-06-12 at 08 46 38

Am I missing a specific config? Is this not supported? The rest of the time it works fine, it's just this kind of regexp that doesn't work.

Thanks in advance.