Is your feature request related to a problem? Please describe.
The language server currently reports 0 items for autocompletion. This is because it doesn't load any step definitions (cucumber expressions and regular expressions).
Describe the solution you'd like
The ExpressionBuilder object that we pass to the CucumberLanguageServer constructor is currently not used. We should call ExpressionBuilder#build on it, passing in the source code of all the Java/TypeScript files in the project. To improve performance, we should only load the source code that contains step definitions, and not production source code. This could use a glob that is defined as part of settings.
The LSP does not yet provide a way to read the file system, so this has to be done using the Node.js fs module. It might need to use some kind of "watch" trigger so that we read again whenever a step definitions file is modified/added/deleted.
Is your feature request related to a problem? Please describe.
The language server currently reports 0 items for autocompletion. This is because it doesn't load any step definitions (cucumber expressions and regular expressions).
Describe the solution you'd like The
ExpressionBuilder
object that we pass to theCucumberLanguageServer
constructor is currently not used. We should callExpressionBuilder#build
on it, passing in the source code of all the Java/TypeScript files in the project. To improve performance, we should only load the source code that contains step definitions, and not production source code. This could use a glob that is defined as part of settings.The LSP does not yet provide a way to read the file system, so this has to be done using the Node.js
fs
module. It might need to use some kind of "watch" trigger so that we read again whenever a step definitions file is modified/added/deleted.Using
fs
has consequences for https://github.com/cucumber/vscode/issues/1 - we cannot usefs
in a web extension.