Closed Narretz closed 2 years ago
It's not really something that this package or the underlying language server handles itself. Its's the typescript
(used by the language server).
That said, do you have those two projects added separately in the sidebar or only the project/
is in the sidebar?
Also, does the typescript itself is able to resolve aliases properly when you run npx tsc
in project/special
?
Hi @rchl,
thanks for asking these questions, they helped me find the problem. I had named the tsconfig in server/ tsconfig.server.json, and with tsc I define --project to use it.
That means LSP-ts never used it. (probably didn't use any config file)
Once I rename it to tsconfig.json
, LSP-typescript correctly picks it up.
So renaming is not a big deal. I guess it would be a bit finicky to support --project per project folder.
typescript-langauge-server
runs one instance of typescript
so it's not possible to use different configurations per different directories (apart from what typescript does by itself by reading tsconfig.json
files itself).
I have tried the following setup:
My sublime project has two paths:
I have both a tsconfig in project/ and one in project/special. The latter extends the former.
LSP-typescript correctly starts two language servers.
However, the config for project/special doesn't seem to get extended from project/
Specifically, it can't resolve path aliases.
Could this be something that the plugin is failing to do correctly?