Skip to content
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

Closed
Phaiax opened this issue Feb 20, 2015 · 5 comments
Closed

New tsserver: compilerOptions / projectOptions #2095

Phaiax opened this issue Feb 20, 2015 · 5 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@Phaiax
Copy link

Phaiax commented Feb 20, 2015

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).

@DanielRosenwasser
Copy link
Member

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.

@DanielRosenwasser
Copy link
Member

As an update, no promises, but we're hoping for tsconfig support in the next 10 days or so.

@DanielRosenwasser DanielRosenwasser added the Question An issue which isn't directly actionable in code label Feb 20, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2015

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?

@Phaiax
Copy link
Author

Phaiax commented Feb 21, 2015

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?

@mhegazy
Copy link
Contributor

mhegazy commented Feb 21, 2015

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.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

3 participants