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

Miss important factor: Language services / language server protocol support #38

Open
cancerberoSgx opened this issue Jul 15, 2018 · 3 comments

Comments

@cancerberoSgx
Copy link

cancerberoSgx commented Jul 15, 2018

I don't know about flow but you forgot to mention an important aspect about TypeScript. Is more than a language, is a language server, similar to LSP (https://github.com/Microsoft/language-server-protocol)) but on its own. General users won't use that API, but TS architecture force users to use their server (tsserver) running in the IDE / editor. This new concept although could seem not KISS, I think in part is why TS UX is faster than flow cause server is managing the project. Also as user you can develop a plugin for refactor, suggestion, folding, fixes, etc and it will work out of the box on any IDE supporting tsserver,

Although there are no much plugins today and ts team is advancing slowly in this aspect I think is a good idea. Perhaps in time will be obsolete in favor of LSP, who now . I'm learning how to use TS Compiler API myself because I want refactor plugins like those you have in other strongly typed languages / IDEs ike Java/eclipse (like move this method to this other class) and these are some I have (WIP) https://github.com/cancerberoSgx/typescript-plugins-of-mine/tree/master/typescript-plugin-proactive-code-fixes

In the future, perhaps now, flow could tackle this implementing LSP (probably there is already one) but TS is in advantage because tsserver API is very close to the language and LSP is more generic since it needs to support all. On the other hand, depending on a server for managing the project could have negative consequences in large projects performance IMO

I think this aspect is very interesting in the comparison too.Nice work, keep it up, couple of links:

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29
https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

@cancerberoSgx cancerberoSgx changed the title missed important factor: Language services missed important factor: Language services / language server protocol support Jul 15, 2018
@cancerberoSgx cancerberoSgx changed the title missed important factor: Language services / language server protocol support Miss important factor: Language services / language server protocol support Jul 15, 2018
@sibelius
Copy link

Flow has LSP support

@cancerberoSgx
Copy link
Author

I know would be interesting to see in which platforms / languages and what's the quality of the implementations.

@niieani
Copy link
Owner

niieani commented Aug 25, 2018

Indeed, quality of LSP is an interesting factor, so I'd welcome a PR adding the comparison of LSP in both platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants