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

TS/JS Path Quick Suggestion IntelliSense Does Not Work Unless QuickSuggestions.strings is enabled #23962

Closed
Syllinger opened this issue Apr 5, 2017 · 17 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded

Comments

@Syllinger
Copy link

  • VSCode Version: 1.11.0
  • OS Version: Windows 7

Steps to Reproduce:

  1. type import or require statement
  2. autocompletion works for keywords
  3. begin to type relative directory in quotes, but receive no suggestions
@kieferrm
Copy link
Member

kieferrm commented Apr 5, 2017

@Syllinger can you give us an example project that doesn't work for you. I just opened the vscode source workspace on Win7 and I get file path completion proposals:

screen shot 2017-04-05 at 4 45 58 pm

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Apr 5, 2017
@Syllinger
Copy link
Author

The problem persists across projects. It's as though path autocompletion in intellisense is disabled. Updated to the latest version, and it suddenly no longer works.

@chrmarti
Copy link
Contributor

chrmarti commented Apr 6, 2017

@Syllinger Could you attach a small sample project that reproduces the problem?

@chrmarti chrmarti self-assigned this Apr 6, 2017
@aaronbalthaser
Copy link

aaronbalthaser commented Apr 6, 2017

I have this same problem. Can you guys please fix this. This is a nightmare developing with a large Angular 2 project. This happened after the update when I open VSCode about an hour ago. Not sure how much more info I can contribute. What is said above pretty much nails the problem down.

This is happening on my MAC, not Windows.

screen shot 2017-04-05 at 7 20 40 pm

Thank you in advance.

@ZhangPuXi
Copy link

I also met this problem, you can just create two js file named a and b, an in file a requires b, there is no tip.

@chrmarti chrmarti assigned mjbvz and unassigned chrmarti Apr 6, 2017
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 6, 2017
@mjbvz mjbvz added javascript JavaScript support issues typescript Typescript support issues info-needed Issue requires more information from poster labels Apr 6, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 6, 2017

I'm also unable to reproduce this in a simple project like @ZhangPuXi describes. Both import and require show completions for both files and directories

To help investigate, please:

  • Disable all extensions to make sure one of them is not causing problems. Just launch code with the --disable-extensions flag to do this

  • Share a small example project and your settings with us

  • Describe the repo steps and the expected behavior in detail, such as:

    hit ctrl+space in require('./|') inside of the file xyz.js and completions for abc.js and folder1 are shown

You can also try collecting the TSServer trace:

  1. Set "typescript.tsserver.trace": "verbose"
  2. Restart VSCode
  3. Try to trigger the completion
  4. Go to the output panel and share the output from the TypeScript section

Thanks

@ZhangPuXi
Copy link

I have no extensions, and the ctrl+space is used by input method switch. In the last version, I don't need to hit ctrl+space, completions are shown automatically

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 6, 2017

@ZhangPuXi Can you try setting:

"editor.quickSuggestions": {
        "other": true,
        "comments": false,
        "strings": true
    }

I suspect the default "strings" setting may be disabling these automatic suggestions for ts/js imports

Can you also confirm that you can manually trigger suggestions and do see the file/directory completion items. ctrl+space is the normal keybinding but yours may be different. Look for what is bound to editor.action.triggerSuggest

@ZhangPuXi
Copy link

Thanks for your time and patience, I have confirmed, I set the editor.action.triggerSuggest to Ctrl + T, it works, but the problem is even though I set the quickSuggestions as you said, the automatic suggestions doesn't work. Please help me the VSCode is my favorite editor. ^-^

@ZhangPuXi
Copy link

The setting

{
  "other" : true,
  "comments" : false,
  "strings" : true
}

works well. Maybe you should modify the default value to this, thanks a lot.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 6, 2017

@jrieken, let me know if you have any thoughts on enabling quick suggestions selectively for js/ts imports. Perhaps a special string token scope that does not get disabled with other strings?

@mjbvz mjbvz removed the info-needed Issue requires more information from poster label Apr 6, 2017
@aaronbalthaser
Copy link

I updated my settings and now it works. Thank you.

@IRCraziestTaxi
Copy link

Thanks, setting "strings" in "editor.quickSuggestions" to true works. My question is: why did quick suggestions work before without that setting but not after this update?

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 6, 2017

@IRCraziestTaxi Before QuickSuggestions was a binary on/off setting. 1.11 allows finer grained control so that you can disable or enable them just in comment and strings. Since js import paths are just strings, the default setting will disable disable suggestions for these as well

@Syllinger
Copy link
Author

@mjbvz: worked for me as well. Thank you!

@mjbvz mjbvz changed the title Directory autocompletion broken after latest update. TS/JS Path Quick Suggestion IntelliSense Does Not Work Unless QuickSuggestions.strings is enabled Apr 6, 2017
@cortopy
Copy link

cortopy commented May 12, 2017

I'm also experiencing this issue since April releases. I've changed the settings and "sort of" works. Autocompletion for paths now works when I type the first letter. However, the editor used to suggest possibilities as soon as I typed each forward slash "/". So I still need to go to the folder to see what the options are.

Any chance of getting the old behaviour back?

@cortopy
Copy link

cortopy commented May 12, 2017

I got it back!!! I updated the Path Intellisense extension and it's now back to normal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants