Open ibrahimBeladi opened 3 months ago
Thanks for your interest in the project @ibrahimBeladi! To ensure clarity on your feature request, could you advise whether I am correct in stating that the request is to: scope paths where step definition snippets can be generated.
Hello @kieran-ryan, I think yes. But let me further clarify just in case.
In the image that I included in the original post, you can see that there are many paths that are suggested to write into, however some of them are unhealthy to write into (the ones in node_modules). The tops ones will not be written into, and only the last 3 will be writable, or I can configure which ones of the 3 are writable in the configuration.
So, what I am suggesting some paths to be writable, and some paths are not. In this case, when I set a path to be not writable, then it would be shown in the auto-completion of snippets, but not shown in the generation/creation of new step definition.
Perfect, is clear @ibrahimBeladi.
In that case, would suggest we keep the 'glue' section as-is and provide additional configuration to scope the paths for snippet generation (which should default to the configured 'glue' paths). Are you aware of any libraries or extensions with similar path configuration that we could take a look at as a point of reference?
Support would need to be implemented in the Cucumber Language Server. If this is an implementation you would be interested to open a PR on (even partially) I would be happy to support you with it. Otherwise feel free to drop any relevant information here that you feel would be useful for someone if they were to pick up this issue. Appreciate the support!
Unfortunately I don't know of a similar path configuration. What would you recommend the key/name for the new property?
I think I can work on it, but I don't have enough time. If no one picks this up, then I might eventually create a PR for it.
Potentially snippet.paths: []
or snippetPaths: []
, though we can return to the naming once we have a solution.
I think I can work on it, but I don't have enough time. If no one picks this up, then I might eventually create a PR for it.
No worries, if you pick it up at any stage and raise a PR, will support you on it - thanks again, good to have this captured!
🤔 What's the problem you've observed?
When using a package that provides a list of gherkins, and when having custom gherkin, then the step definition will suggest both the package's step definition files and the local files. Where it should be only the local files, or a specified list of files.
✨ Do you have a proposal for making it better?
I am thinking of 2 solutions:
glue
property into 2 propertiesglue
property allow having object syntax, where we can add a key calledshowInAutoCompletion
or something similar📚 Any additional context?
I am using uuv, so this issue is not wide spread yet