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
No IntelliSense for TS/JS files #5161
Comments
Try to add files section in your tsconfig.json, like in this example Not sure that will help, but that's the first thing that I would do. |
Tried already to add |
I'm having a similar problem, but I do get a warning message:
|
Hi @egamma your screenshots show how it works on my colleagues mac. Im using the latest stable version and insiders (0.10.15-insider | 0.10.11). Is it possible to activate verbose logging in vscode/tsc? Maybe vscode isn't communicating with the TS compiler API properly!? EDIT: |
The fact that you do not get squiggles indicates that the tsserver has crashed and isn't running, assigning to @dbaeumer. |
I tried to reproduce this on the insider 0.10.15 without any luck. And the project is more than trivial. So I doubt that this is a tsserver issue at all. @otbe can you think of any difference between the Macs with the different behaviour. Are you using nvm ? |
@dbaeumer But how I said, this problem is not only related to typescript. Simple JS files (see screenshot) did not work either. Both macs using nvm (node 4 & 5). Whats unique to my mac:
What I tried so far:
Did I miss something @donaldpipowitch? Is there anything I can do to provide more information? Start vscode in another mode or something like this. |
I also use brew and nvm (but no docker tools). @otbe and I share a lot of projects and tools. We can't spot the difference in our setup. vscode works great for me. |
@jrieken |
Anything special about the file paths? Like ümlauts, network-share, sym links etc? |
@otbe Just for clarification: the tsserver powers both TS and JS. That is why both don't work in your setup. |
@otbe can you please try the following:
You should see something like this in the console: |
@jrieken can you help with the env and starting from a shell on the Mac please. |
On the mac that would be |
Can you check your |
@otbe and I use the same repositories without any changes. It can't be really a project-specific reason. It must be his global setup somehow :( |
@jrieken Is it possible to "debug" tsserver.js? Tried to place some EDIT: |
Maybe this is related to my problem. I use a case-sensitive filesystem on my mac. |
yeah, that might be something... How do you start vscode? just clicking the icon or via the Another case would be special characters in path names, we know that on mac characters sometime differ in how they are encoded. Anything non-ascii in your paths? |
I just click the icon and open my project folder via |
@otbe: from the error message however it is clear that the file we are opening in the tsserver doesn't match the file name when asking for code complete. That is why the server response with no project info. You can debug the tsserver by setting the env variable TSS_DEBUG to a port number. For example TSS_DEBUG=5859. Then you can attached a debugger like node inspector to the running server. I will think about what could cause this on Mac. I also will test you workspace on Linux which is case sensitive as well. |
And this is a bit optimistic in my opinion :)
|
They should really not do that |
If I change |
Glad that works. We'll have to follow up with the TypeScript team. The filenames they cache shouldn't be normalised. Or they should apply the same rules then to the file paths we send them |
Indeed 👍 |
@otbe thanks a lot to track this down. Testing it on Linux would not have helped :-). I opened microsoft/TypeScript#8139 to get that fixed. |
@otbe While I wait for a proper release, how do I set |
@jakepearson I utilize my project version of typescript for that:
|
@otbe That worked. Thanks a bunch. |
Or globally: npm i -g typescript@next "typescript.tsdk": "/usr/local/lib/node_modules/typescript/lib" |
This seemed to work at one point but now doesn't. I think it's this[0] bug. Temporarily install the latest TypeScript and update VS Code user settings: "typescript.tsdk": "node_modules/typescript/lib" [0] microsoft/vscode#5161
Use workspace settings for the TypeScript bug[0] workaround. A follow-up to 38f63c2. [0] microsoft/vscode#5161
This got fixed by the TS team a long time ago. |
Hi *,
I try to replace webstorm with vscode as my main development editor/IDE, but as of now its not possible for me. Im not sure if this is a bug or misconfiguration of my system but IntelliSense, "Go to definition" and other useful stuff don't work for JavaScript or TypeScript files. On the other hand "context-aware" JSONs like
tsconfig.json
,package.json
do work like expected.This is my test repo: https://github.com/otbe/vscode-intellisense-test
And this happens on my (and only on my) machine:
I have made no changes to the default settings of vscode.
Grateful for every hint :/
Thanks.
Versions:
The text was updated successfully, but these errors were encountered: