Skip to content

Don't use InitializeParams.rootUri if workspaceFolders is specified #950

Closed
@alexander-doroshko

Description

@alexander-doroshko

Hi from JetBrains,

The LSP spec deprecates InitializeParams.rootUri in favour of workspaceFolders.

I noticed that rootUri is used unconditionally in the tw.ts file.

This causes the following problem. The IDE sends the initialize request as follows:

{
  "method": "initialize",
  "params": {
    ...
    "rootUri": null,
    "workspaceFolders": [
      {
        "uri": "file:///foo/bar",
        "name": "bar"
      },
      {
        "uri": "file:///foo/baz",
        "name": "baz"
      }
    ]
  }
}

and the server fails to initialize, it says No workspace folders found, not initializing.

In my understanding, if workspaceFolders is given, the server should ignore rootUri.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions