eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
60 stars 53 forks source link

Remove end slash from rootPath / rootUri / workspaceFolders #963

Open zulus opened 4 months ago

zulus commented 4 months ago

While fighting with https://github.com/eclipse-wildwebdeveloper/wildwebdeveloper/pull/1520 and analyzing different behaviors in Typescript LS between VScode and Eclipse, I realized that typescript is not able to correctly find projectRootPath.

It's because rootPath/rootUri/workspaceFolders always ends with "/" (at least on mac). So when Typescript LS search for projectRoot by checking (in loop) if documentPath starts with rootPath + DIR_SEPARATOR is not able to find it