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

Intellisense not working #7166

Closed
egamma opened this issue Feb 20, 2016 · 7 comments
Closed

Intellisense not working #7166

egamma opened this issue Feb 20, 2016 · 7 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@egamma
Copy link
Member

egamma commented Feb 20, 2016

From @hellopao on February 15, 2016 3:15

I've upgraded the vs code to the latest version ,and the Salsa was enabled.
Now, the code intellisense does not work without an jsconfig.json file. but version 0.10.6 worked well.

withoutjsconfig
withjsconfig

Copied from original issue: microsoft/vscode#3017

@egamma egamma self-assigned this Feb 20, 2016
@egamma
Copy link
Member Author

egamma commented Feb 20, 2016

From @meritozh on February 15, 2016 3:41

Same issues. I hope Salsa can works without a jsconfig.json. How about contain a default jsconfig.json without manual creating one?

@egamma
Copy link
Member Author

egamma commented Feb 20, 2016

From @nilshartmann on February 18, 2016 13:15

In my case Intellisense (even with a jsconfig.json) only works for modules that have been required but not for modules that have been imported using ES6 import:

intellisense-es6

You can find my sample project here: https://github.com/nilshartmann/vsctest
My environment:

  • Visual Studio Code Version 0.10.8 with Salsa preview enabled
  • No extensions
  • MacOS
  • TypeScript installed locally (1.9.0-dev.20160218)
  • jsconfig.json (tried several more variants all without success):
{    
    "compilerOptions": {
        "target": "ES6"
    },
    "exclude": [
        "node_modules"
    ]
}

Just noticed: Importing a module from my own project that uses ES6 export seems to work.

I'm not sure if this is the same problem or to better open a new Issue?

@billti
Copy link
Member

billti commented Feb 21, 2016

If you open a loose file, then we have no project context, so we're not pulling in the node.d.ts. That would explain the require("fs'"); not working in the loose file scenario above.

For the ES6 import case, this may be similar/related to #7076. I'll take a look at these together.

@billti billti added the Bug A bug in TypeScript label Feb 21, 2016
@billti billti assigned billti and unassigned egamma Feb 21, 2016
@billti billti added this to the TypeScript 2.0 milestone Feb 21, 2016
@billti billti added the Fixed A PR has been merged for this issue label Jun 20, 2016
@billti
Copy link
Member

billti commented Jun 20, 2016

Verified the behavior is as expected in 'master' currently. Note that above for the statement import http from "http", this is a default import, you'll need to set "allowSyntheticDefaultImports": true for this to work, else instead use import * as http from "http" to import the CommonJS module as a namespace.

@billti billti closed this as completed Jun 20, 2016
@Hosar
Copy link

Hosar commented Feb 26, 2017

Still not working. I have the following. And even if I set "allowSyntheticDefaultImports": true still doesn't show any Intellisense.

Version 1.9.1
Commit f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
Date 2017-02-08T23:44:55.542Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

@mhegazy
Copy link
Contributor

mhegazy commented Feb 28, 2017

@Hosar this is an old issue. please file a new issue and provide enough information for us to be able to reproduce it.

@grandsilence
Copy link

So, whan that shit will be fixed? I've got same annoying issue. Hate this. ver 1.10.2

@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
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

5 participants