Skip to content

Intellisense doesn't work on JavaScript file until I change language mode #11043

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

Closed
waderyan opened this issue Sep 21, 2016 · 8 comments
Closed
Labels
Needs More Info The issue still hasn't been fully clarified VS Code Tracked There is a VS Code equivalent to this issue

Comments

@waderyan
Copy link

From @kai23 on September 13, 2016 8:31

  • VSCode Version: 1.5.2
  • OS Version: 10.11.6

Steps to Reproduce:

  1. Create folder Hello
  2. In Hello, create file app.js
  3. code . or open this folder in VSCode
  4. In app.js, type : console. - No Intellisense
  5. Change the language mode to "JavaScript React"
  6. Type console. - Intellisense is present

Gif to show what happen :

ezgif-340640585

No Extension, brand new VSCode

Copied from original issue: microsoft/vscode#11938

@waderyan waderyan self-assigned this Sep 21, 2016
@waderyan waderyan added the js label Sep 21, 2016
@waderyan
Copy link
Author

From @NeilAllen on September 13, 2016 13:41

Same here...

@waderyan
Copy link
Author

@kai23 thank you for opening this issue. I have observed similar behavior and think it could be related to Microsofty/TypeScript #10735 .

I cannot reproduce right now

intellisense_simple

Can you help me track this down?

Add this to your settings

"typescript.tsserver.trace": "verbose"

Additionally, set the environment variable TSS_LOG=-level verbose. there should be a log file written next to tsserver.js that would have the form of .log[0-9]+

@waderyan
Copy link
Author

From @kai23 on September 13, 2016 19:15

Here is the full log. I did the exact same thing as shown in the gif : http://pastebin.com/pr32P8j8

@waderyan
Copy link
Author

From @kai23 on September 13, 2016 19:17

maybe that's the part which you may like ?

[Trace - 9:12:34 PM] Sending request: completions (3). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/XXXX/Hello/app.js",
    "line": 1,
    "offset": 2
}
[Trace - 9:12:34 PM] Response received: completions (3). Request took 3 ms. Success: false . Message: Error processing request. No Project.
[Error - 9:12:34 PM] 'completions' request failed with error.
Error processing request. No Project.

and :

[Trace - 9:12:34 PM] Response received: projectInfo (4). Request took 2 ms. Success: false . Message: Error processing request. Cannot read property 'projectFilename' of undefined

Edit: Because I needed to work today, I installed the project manager extension. I removed it, but still.
Edit 2: have seen this issue ( #8212 ) but don't understand how it was fixed
Edit 3: adding a jsconfig.json file juste makes things worst, no autocomplete at all ( with this :

{
    "compilerOptions": {
        "target": "ES6"
    },
    "exclude": [
        "node_modules"
    ]
}

Edit 4 : same things happen in the insiders build

PS : didn't found the log file. Maybe I'm not searching the right place ?

/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/server/typescript/lib
╰─➤  ls -l 
total 11552
total 11552
-rw-r--r--@ 1 xxx-xxx  staff   266B 19 avr 17:00 README.md
-rw-r--r--@ 1 xxx-xxx  staff   171K 19 avr 17:00 lib.core.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   218K 19 avr 17:00 lib.core.es6.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   222K 19 avr 17:00 lib.core.es7.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   696K 19 avr 17:00 lib.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   518K 19 avr 17:00 lib.dom.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   744K 19 avr 17:00 lib.es6.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   747K 19 avr 17:00 lib.es7.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   8,7K 19 avr 17:00 lib.scriptHost.d.ts
-rw-r--r--@ 1 xxx-xxx  staff    40K 19 avr 17:00 lib.webworker.d.ts
-rw-r--r--@ 1 xxx-xxx  staff   2,3M 23 avr 04:00 tsserver.js

@waderyan
Copy link
Author

@kai23 thanks for logging this for us. Sending to TS team to look into further.

@zhengbli
Copy link
Contributor

zhengbli commented Sep 23, 2016

Failed to repro the issue on windows and OS X. @kai23 I noticed you are using a non-English copy of VSCode. Does your "XXX" folder have a non-English folder name? Just a thought.

@zhengbli zhengbli added the Needs More Info The issue still hasn't been fully clarified label Sep 23, 2016
@kai23
Copy link

kai23 commented Sep 23, 2016

Hey,

My XXX folder have this form = mbp-kai without any special chars

@mhegazy
Copy link
Contributor

mhegazy commented Dec 15, 2016

Could not get to repro it locally on latest either. closing for now. please reopen if the issue is still there.

@mhegazy mhegazy closed this as completed Dec 15, 2016
@waderyan waderyan added the VS Code Tracked There is a VS Code equivalent to this issue label Dec 16, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info The issue still hasn't been fully clarified VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

4 participants