alexkrechik / VSCucumberAutoComplete

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

vscode multi root support #131

Open stupiduglyfool opened 6 years ago

stupiduglyfool commented 6 years ago

Now vscode has multi root support, extensions need to be updated in order support it.

https://github.com/Microsoft/vscode/wiki/Extension-Authoring:-Adopting-Multi-Root-Workspace-APIs

It would be great if this addin was usuable from a multi root workspace!

dzsodzso63 commented 6 years ago

sure, I even tried this way and it did not work (just became slow):

    "settings": {
        "cucumberautocomplete.steps": [
            "**/*.rb"
        ],
        "cucumberautocomplete.syncfeatures": "**/*.feature"
    }
alexkrechik commented 6 years ago

@dzsodzso63 Looks like your problem is not related to the original issue. Could you try to use more accurate pathes (like "test/features/*/.feature" and "test/steps/*/.rb") ?

StanislavKharchenko commented 6 years ago

I have the same problem while working with Workspace. Trying to add options in workspace settings, like:

    "settings": {
        "cucumberautocomplete.steps": [
            "${workspaceRoot}/WL/e2e/Tests/step_definitions/*.ts"
        ],
        "cucumberautocomplete.syncfeatures": "${workspaceRoot}/WL/e2e/Tests/features/*.feature",
        "cucumberautocomplete.strictGherkinCompletion": true
    }

It doesn't help. Also, trying to add the same settings in .vscode/settings.json, but VS Code says that "...setting will be applied when you open this folder directly".

Any idea about workaround?

Thank you.

chbndrhnns commented 6 years ago

I would also like to know how this plugin can be configured in a multi-workspace setup.

alexkrechik commented 6 years ago

Unfortunately, actually, extensions doesn't support multiple roots. Many code changes should be applied to support this, so current issue is in some future plans, may be for the next extension release.

onthespotqa commented 4 years ago

any plans on supporting this?

prometheas commented 4 years ago

Multi-root workspaces are a fairly old feature of VS Code by now.

I'm willing to make an attempt for a PR, assuming I can get a bit of support getting started with a bit of knowledge transfer from the maintainer (or anyone familiar enough with the code base to offer some understanding as to why this effort would be particularly complicated for this extension).

alexkrechik commented 2 years ago

https://code.visualstudio.com/docs/editor/multi-root-workspaces

xeger commented 2 years ago

FYI @alexkrechik the language server protocol supports multi-root workspaces since 3.6.0 (see workspaceFolders param of initialize request).

Of course, knowing about the workspace roots is just the beginning of the problem; I agree with you that refactoring to support multiple gherkin projects in one workspace will be a lot of work. (Workspaces are not the core issue -- it's multiple "gherkin roots" i.e. multiple distinct packages with separate steps/features -- multiple workspace roots is one facet of this problem, but it can happen in a single-root workspace too)

One possibility is spawning a new gserver for each gherkin project, i.e. push more of the effort onto gclient. Still pretty complex. :(

toehser commented 11 months ago

Could we somehow do an ugly not real full fix that will at least support "*/.java" when multiple roots are found? Please? I just want it to find my steps in the simple case... Ugh...

alexkrechik commented 5 months ago

Will try to at least review it in the next milestone