Merge NpmIntellisense into this extension
eyalellenbogen opened this issue · 5 comments
Hi again,
What do you think about merging your other extension (https://github.com/ChristianKohler/NpmIntellisense) with this one?
I think it makes sense to have one extension take care of import statements.
E
I also use them together and have a problem: say I'd like to import a relative file and want to type ./
the .
will trigger "accept" and accepts the first suggested npm module. I can't find the corresponding shortcut to change this behaviour :/
Update
The same problem exists for relative paths like ../../
. The third .
(say ../.
) will accept the first suggested file.
@donaldpipowitch the solution is to unbind .
. Add this to keybindings.json:
{ "key": ".", "command": "" }
@dbettini Thank you for the hint. Didn't know that. I also added ".." as first suggestion which makes it even faster since you only have to hit enter.
Awesome, thanks.
@eyalellenbogen: PathIntellisense is not just for import statements but for path completion in general. You can for example also autocomplete url in html src attributes. Also in a few years, npm could be replaced by another package manager while autocompletion for paths is something I don't expect to go away soon. This is why I created two extension separately.