-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocompletion should suggest patterns associated with the specified context/state only #130
Comments
It looks like the |
@jm-paulin, step definitions not being recognized is a different issue; there is a lengthy discussion of it in #120. Kieran Ryan has listed some of the possible causes in a lengthy post there; some of those you can fix by changing your step definitions, but some you can't. |
Thanks for raising @jm-paulin and cheers @The-BDD-Coach for pointing to some of the challenges - thankfully a small portion of these issues will be resolved in a coming release. @jm-paulin, as this would be separate from @The-BDD-Coach's feature request, would you be able to raise a bug report on this project with as much detail as possible and a minimum reproducible example (e.g. step definition, feature file, path where files are stored, relevant VSCode settings, language, framework, etc.). Based on that we can determine where this issue belongs and whether a fix is required. However, language support issues typically relate to the Cucumber Language Service. |
I could create an issue @kieran-ryan but I think that would be a duplicate of #147, closed 4 months ago. I personally think #147 is a valid issue. |
@jm-paulin @and steps are at least sometimes recognized; I am looking at one right now that is recognized. If you have an example of an @and step not being recognized when the underlying @given or @then is recognized, that is worth looking into. If it isn't being recognized and the reason isn't any of the ones that Kieran listed in #120 then it is certainly worth writing up as a separate issue. If you write it up as a separate issue please show the complete source code of the step definition; as Kieran has mentioned, all of these issues are related to the language service, so the exact text of your step definition is critical. |
Created #225. |
🤔 What's the problem you're trying to solve?
When I type 'Given...', the autocompletion suggestions include 'When' and 'Then' statements; those aren't valid if the first word in the line is 'Given'. Similarly when I begin a 'When' or 'Then' statement, the autocompletion suggestions aren't filtered to include only 'When' or 'Then' steps; they include everything that appears to be a textual match.
Offering too many suggestions, including suggestions that aren't valid in the current context, clutters the UI and makes it more difficult for the user to find the suggestions that are actually useful. Novice users could also be misled into writing invalid Gherkin.
✨ What's your proposed solution?
Modify the autocompletion logic so that it:
The text was updated successfully, but these errors were encountered: