Open Bnaya opened 8 years ago
I do see the need for this feature. However, one concern of mine over supporting project level tsdk location is that it generates the need for a sublime specific config file at the project location. Putting the setting in the tsconfig.json
file is not the right thing to do, as the tsconfig file parsing is done universally by the language service instead of the editor to keep the experiences consistent across editors.
Don't we also just spin up one instance of the tsserver.js host regardless of how many tsconfig.json files/folders you have open? If so, I don't see how we could achieve this (without a non-trivial change in architecture).
On #433 you've added support for editor global setting for tsdk location, it's common that a developer will have several projects with different typescript version. if you set of globally in the editor it might break the plugin for some of the projects. You can read the tsdk location from the project file cascaded to the global preferences file, and the developer will be able to set different typescript version per project.
It should also support relative path, relative to the project file, so it will be possible to do something like:
./node_modules/typescript/lib/tsserver.js
I know sublimelinter infrastructure supports global and per project settings, you can