Skip to content
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

Only launch new instances of LS if it doesn't support multiple folders #627

Closed
radeksimko opened this issue May 10, 2021 · 1 comment · Fixed by #654
Closed

Only launch new instances of LS if it doesn't support multiple folders #627

radeksimko opened this issue May 10, 2021 · 1 comment · Fixed by #654
Labels
bug Something isn't working

Comments

@radeksimko
Copy link
Member

The extension communicates via client capabilities that it supports multiple folders:

{
    "processId": 85078,
    "clientInfo": {
        "name": "vscode",
        "version": "1.56.0"
    },
    "rootPath": "/private/var/workspace/tf-test/github",
    "rootUri": "file:///private/var/workspace/tf-test/github",
    "capabilities": {
        "workspace": {
            "workspaceFolders": true,

this can also be seen by the client sending all opened folders, as expected in the initialize request:

    "workspaceFolders": [
        {
            "uri": "file:///private/var/workspace/tf-test/local",
            "name": "local"
        },
        {
            "uri": "file:///private/var/workspace/tf-test/netlify",
            "name": "netlify"
        },
        {
            "uri": "file:///private/var/workspace/tf-test/github",
            "name": "github"
        }
    ]

The LS therefore should have a way of opting into multi-folder mode via server capabilities and prevent the extension from launching more processes.

However when it does so:

{
    "capabilities": {
        "workspace": {
            "workspaceFolders": {
                "supported": true,
                "changeNotifications": "folder-change"
            }
        }

the extension still launches 3 instances of LS (1 for each of 3 folders) anyway.

WIP branch with experimental multi-folder support is available from hashicorp/terraform-ls#502

@github-actions
Copy link

github-actions bot commented Jul 9, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant