r/programming • • Jun 15 '19

Announcing the Visual Studio Code Installer for Java

https://devblogs.microsoft.com/visualstudio/announcing-visual-studio-code-java-installer/
840 Upvotes

249 comments sorted by

View all comments

Show parent comments

15

u/[deleted] Jun 15 '19

You are not being completely fair. There are probably cases when a JS/TS project is somehow misconfigured and VSC can't handle imports.

However, in my (TS) projects with absolute imports VSC *does* magically fix imports when moving files. It can also rename variables, functions, classes intelligently (not regexp/string matching)...

However, there are limits in the language server protocol (https://langserver.org) used by VSC that do not bother IntelliJ whose products can indeed do more advanced refactorings.

More info:

https://discuss.kotlinlang.org/t/any-plan-for-supporting-language-server-protocol/2471/6

https://github.com/Microsoft/language-server-protocol/issues/61

2

u/Giannis4president Jun 15 '19

As pointed out in other comments, it works only if you have TS configured. Still I'm downvoted for showing a proof. Reddit is fun

1

u/vqrs Jun 15 '19

I love the language server protocol idea. I always wondered why such a thing was not done earlier or never seemed to find adoption.

I've looked at the protocol a while back and couldn't help shake the feeling that the additions they kept making seemed a bit rushed and tailored to the specific new refactoring/whatever they wanted to add for their TypeScript support rather than thinking about the bigger picture and generality. I forget the details now, but some choices seemed very odd and limiting.