-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
New tsserver: compilerOptions / projectOptions #2095
Comments
That's the general direction we're moving in, though I don't think we can make a hard guarantee on when it will be available. There is active work on it though. |
As an update, no promises, but we're hoping for tsconfig support in the next 10 days or so. |
I would expect this to work by you telling the server to open a file, the server will figure out what is the tsconfig file that the file belongs to and use to load configurations for the file, as well as other interesting files. Additionally, the server will have an additional command to get the project details, that would return you the list of files in a project as well as the tsconfig file it is using so you can pick up additional configurations from the file as needed (i would assume you would use it to host your plugin configurations as well). Would this design make sense to your plugin? |
In principle yes, for the normal use. In my editor (sublime), the user is used to only edit json configuration files, so it should at least be possible to retrieve the config file name to be able to open it for edits. Somewhere else (i think it was the tsconfig.json issue or some linked page or here:? #1927 ) someone discussed a few weeks ago that a single (or simple) tsconfig.json is not enough for some larger projects. (I don't know exactly why, but think of typescript itself.). I think it should also be possible to define the config file manually like the @ file option of tsc.js. Conclusion: I don't know what power users really want, i only can guess. That what you suggested would be perfectly fine for >90% of the users i think. Another question which should be answered: Who is responsible for reloading, if the user changes the config file? The tsserver or the editor? |
The ts server is responsible for monitoring and reloading. Do the resistor would just register for project events like it would for errors and would get a notification once something happens. |
I don't know if somebody is still working on the new tsserver. Then :) please go on, you are probably already working on this.
But if not: It would be cool if tsserver would accept the compiler Options via command line or tsconfig.json.
There is a method called openConfigFile() @ editorservices.ts:639 but it is never called. Only the default compiler options are used (:697).
The text was updated successfully, but these errors were encountered: