-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
TSServer : make the ScriptInfo standalone #2297
Comments
you are right. a PR would be appreciated :) one thing to note, i would highly recommend you use the server. I understand from your comment that you have some requirements that you feel the server will not achieve. I think for these we are more than happy to look into and address. The main issue here, is that the LanguageService API requires a smart host, that leads to plugins falling out of date quickly when new features are added specially these touching resolution (e.g. tsconfig). and just to sight an example we are looking into supporting node module resolution (e.g. looking in node_modules for instance) and possibly some glob support for tsconfig, and so on.. from a plugin point of view, the update would be seamless. |
Specifically this : https://github.com/Microsoft/TypeScript/blob/5141f1d4c984ca256df34a455e96d400a735d3c3/src/server/client.ts#L479-L481 As I understand a client for a TSServer will not get access to Perhaps it isn't required since new features should be readily accepted into TSServer(https://github.com/Microsoft/TypeScript/blob/5141f1d4c984ca256df34a455e96d400a735d3c3/src/server/session.ts) given due justification? |
That is correct. the problem is the server is used over a text based protocol, and program would not be serializable. What are you using the program for today?
That is the other alternative. you can just use session, and do not use the text based server protocol |
In bringing in the efficient line handling / change set handling code from TSServer I've found that the heart of the code is really just the
ScriptInfo
.I've needed to bring in all this code : https://github.com/TypeStrong/atom-typescript/blob/bdaff3204ee62de8ab83df962ae224081fbd245b/lib/main/lang/languageServiceHost.ts#L3-L1066
When all I really needed was this : https://github.com/TypeStrong/atom-typescript/blob/bdaff3204ee62de8ab83df962ae224081fbd245b/lib/main/lang/languageServiceHost.ts#L1017-L1066
I don't see
host
,defaultProject
orfileWatcher
used https://github.com/Microsoft/TypeScript/blob/37c6f69f015c3da3c709e2bae0786aa55a10a045/src/server/editorServices.ts#L23-L27 would be great if these dependicies were removed andScriptInfo
was made public (exported).refs TypeStrong/atom-typescript#179
Please correct me if my understanding of this code is correct ❤️
/cc @steveluc @mhegazy
The text was updated successfully, but these errors were encountered: