-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Intellisense for nodejs required packages. #957
Comments
@jrieken Is this possible to implement without something like a (typescript) definition file? |
very hard. behind the scenes we just the typescript compiler to drive JS. There is a branch in TS that adds deep understanding of commonjs modules. Once we have adopted that we will be better off. |
Good to know :). |
As vscode is marketed as a nodejs IDE I think it is very important to add this support. This will make Webstorm has this kind of support but its too heavy. |
I never saw VS Code marketed as an IDE to be honest, but maybe I just missed that :). In my opinion, VS Code is an enhanced text editor, just like Atom or Sublime Text. If you want an IDE, go for Visual Studio, Eclipse, Webstorm, etc. ;) Apart from that, it would be very nice to have this. I was only asking @jrieken if it was possible as I was interested in the technology behind it and to how it can be accomplished. |
@SamVerschueren I think having this feature will be of great advantage for vs code compared to other editors. |
In full agreement - VS Code should have the best JS support you can get, like the same is true for TS, C#, go you name it. As of today our JS support is a little rusty, incomplete, and buggy. The TS team works on better support for plain JS and once they are ready we will jump on it. @SamVerschueren The details are crazy ;-) We take JS code, create a copy with TS-constructs on the fly, pass that to the TS compiler, and map the results back to original JS code. This guy for instance takes |
@jrieken : So the support for this feature will take some time to implement. |
@jrieken So type definitions won't be necessary anymore in the future as they can be generated on the fly? Or will |
depends... Even if tsc understands this
to be a module that exports a member |
@abhilashsajeev The TS team is working on this since a while and close to finish |
All details in here: microsoft/TypeScript#4789 |
@jrieken 👍 Thats great! as long as this comes out I would completly switch my node.js devs to vs code. Hope to have this by end of year. |
Is there any update on this, microsoft/TypeScript#4789 has been fixed. |
@sarbbottam yes, Code is now using Salsa. Currently Salsa still requires that you install .d.ts files. @abhilashsajeev Once you do |
Thanks @egamma. Is there no way to get intellisense with out |
@SamVerschueren correct, and we have already updated our docs. |
@egamma nice 👍 |
Pls see https://code.visualstudio.com/Updates#_languages-javascript for scenarios where you do not need |
Can someone please tell me if this is supposed to work? I've spent the entire day reading just about everything I can - which was a mistake, because I'm pretty sure no one on the planet has the same answer - yes,no,with d.ts,without d.ts, typings, dst, .jsconfig, .tsconfig, user settings, etc - not one straight answer. Sorry. |
Yes that works, but it seems that Some notes to take into account.
|
Issue created #4943 |
@SamVerschueren I was a bit frustrated previously, so thank you for your time. I am using the Insider edition, and the code you wrote does indeed work. At some point yesterday in my attempt to fix my issue, I had downloaded typings, and installed several (node,browserify) d.ts files to my original project, and the fix you proposed above didn't work until I deleted the typings folder in my project. However, I couldn't duplicate that behavior in a new project. I'm happy just to get intellisense working again, so thanks for helping me out. |
Closing this as we have moved to project Salsa. Let's discuss new issues separately. |
@jrieken Could you please provide a link? |
Salsa is part of TypeScript (basically the |
In the following code I required express but when I enter app and press crtl + space it shows no suggestions.
It would be nice to have code assist for installed packages because nodejs developers always play with packages.
The text was updated successfully, but these errors were encountered: