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

Feedbacks about the paths autocomplete (v 1.8) #17331

Closed
ggregoire opened this issue Dec 15, 2016 · 5 comments
Closed

Feedbacks about the paths autocomplete (v 1.8) #17331

ggregoire opened this issue Dec 15, 2016 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues typescript Typescript support issues

Comments

@ggregoire
Copy link

ggregoire commented Dec 15, 2016

  • VSCode Version: 1.8

Hey guys! I had a discussion on Hacker News with @mjbvz about this new feature.

I think the feature could be improved by copying what the extension Path Intellisense provides.

Some screenshots will speak for themselves.

Here is the extension:

screen shot 2016-12-15 at 11 20 11

screen shot 2016-12-15 at 11 20 22

I didn't look at the code but I would bet that they detect when a string starts with './' or '../' and then list the files and folders in the current or previous directory.

IMO it's perfect and it's exactly what I expect from a paths autocomplete.

For comparison, here is the native feature:

screen shot 2016-12-15 at 11 21 11

screen shot 2016-12-15 at 11 24 41

screen shot 2016-12-15 at 11 24 47

My thoughts:

  1. Intellisense suggests a lot of things (paths, snippets, symbols in the current file, etc)!

On this screenshot, the file contains few lines of code (it's the ./index.js of the project) so the list of suggestions is relatively small. But I tried in another project, in a file with 300 LOC and a lot of symbols, and the list of suggestions was really too long.

The suggestion I was looking for was components which is the first folder of the project in alphabetical order. When I started typing, components was not in the first visible suggestions. Actually I had to type almost the full name of the folder, i.e. './compon', to get the suggestion.

  1. The 🔧 icon is not really intuitive.

The extension uses a file icon. You could display a folder ( 📁 ) or a file ( 📄 ) in function of the suggestion.


Hope these feedbacks can help.

Thanks for the amazing work! 🙂

@ggregoire ggregoire changed the title Feedbacks about the paths autocomplete (import/require) Feedbacks about the paths autocomplete Dec 15, 2016
@ggregoire ggregoire changed the title Feedbacks about the paths autocomplete Feedbacks about the paths autocomplete (new VSCode in 1.8) Dec 15, 2016
@ggregoire ggregoire changed the title Feedbacks about the paths autocomplete (new VSCode in 1.8) Feedbacks about the paths autocomplete (VSCode 1.8) Dec 15, 2016
@ggregoire ggregoire changed the title Feedbacks about the paths autocomplete (VSCode 1.8) Feedbacks about the paths autocomplete (v 1.8) Dec 15, 2016
@mjbvz mjbvz added intellisense javascript JavaScript support issues typescript Typescript support issues labels Dec 15, 2016
mjbvz added a commit to mjbvz/vscode that referenced this issue Dec 16, 2016
Part of microsoft#17331

Updates path completions for directories and files to use a file icon instead of the generic icon they currently use.
mjbvz added a commit that referenced this issue Dec 16, 2016
Part of #17331

Updates path completions for directories and files to use a file icon instead of the generic icon they currently use.
@mjbvz
Copy link
Contributor

mjbvz commented Dec 16, 2016

Quick update on the the second issue. I just merged in a fix (#17434) to show both path and direcotry completions with a file icon instead of the generic icon:

screen shot 2016-12-16 at 3 14 17 pm

I'm also looking into using different icons for directories and files, but we need to make a change on the VSCode side to support a directory completion type (tracked by #17435).

@mjbvz
Copy link
Contributor

mjbvz commented Dec 16, 2016

@ggregoire Can you please try setting "editor.snippetSuggestions": "none" and checking if you still see the unwanted completions in the paths? It looks like most of those suggestions may be coming from snippets, so this issue may be related to #1304

Thanks

@ggregoire
Copy link
Author

ggregoire commented Dec 18, 2016

Thank for the update on the second issue. It was quick!

Yes this setting removes the snippets suggestions in the paths but I usually use these suggestions, so it's not really practical for me. :)

By the way, there are not only snippets suggestions in the list, there are also all the symbols used in the file:

screen shot 2016-12-18 at 10 37 28

And actually, I'm not even sure the feature is working. I disabled all my extensions and I'm looking for the directory Login (same level as the file):

screen shot 2016-12-18 at 10 53 07

On the previous screenshots, it seems like Intellisense proposed config in the suggestions only because there was a symbol config in the file.

--

If it helps to investigate, my user settings:

{
    "editor.fontFamily": "Operator Mono",
    "editor.fontSize": 15, // 14 with default font
    "editor.tabSize": 2,
    "editor.renderIndentGuides": true,
    "files.trimTrailingWhitespace": true
  }

and workspace settings:

{
  "files.associations": {
    "*.js": "javascriptreact"
  },
  "javascript.validate.enable": false
}

Version 1.8.0 without extensions.

@mjbvz
Copy link
Contributor

mjbvz commented Dec 20, 2016

@ggregoire I'm unable to repo the extra completions showing when trying to complete import foo from './|'. If you do not have a package.json, the completing on an empty require "" path will fallback to word based suggestions from the current document.

A few other questions:

  • Does the workspace have a package.json file?
  • Does the workspace have a jsconfig.json file?
  • If possible, can you please share a simple test project that shows this behavior

Thanks.

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Jan 4, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Jan 4, 2017

Closing as I'm unable to reproduce the remaining problem. @ggregoire please let me know if you are still hitting this and I can investigate further.

@mjbvz mjbvz closed this as completed Jan 4, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants