vscode
vscode copied to clipboard
Snippet generation does not respect configuration
👓 What did you see?
I have a cucumber.json file with the snippetInterface setting set to async-await. When I run cucumber the snippets outputed for undefined steps show the use of async function.
When I generate a step from the feature file via the plugin, the step generated uses a synchronous arrow function.
✅ What did you expect to see?
The generated step should use an async function with the function keyword, just as cucumber does in its output.
📦 Which tool/library version are you using?
cucumber-js v8.10.0
🔬 How could we reproduce it?
- Create a
cucumber.jsonfile with this content:
{
"default": {
"formatOptions": {
"snippetInterface": "async-await"
}
}
}
- Open vscode with the cucumber plugin loaded.
- Write a feature file with undefined steps.
- Generate a step from the feature file via the plugin.
- See the generated step.
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
Thanks! Linking the associated Cucumber JS configuration documentation. This will require a change to the Cucumber Language Service to support snippet configuration - see the JavaScript snippet implementation in the language service.
Any news regarding that ?
@despellhtb, issue is reflective of status. Accommodation has been made in the Cucumber Language Server to configure custom snippet templates, though this setting is not yet fully integrated nor available from the extension; and of course would duplicate the aforementioned configuration - though might be a satisfactory mitigation if implemented.
Hope to see this implemented.
Any PRs or suggested code changes would be of great assistance.