Skip to content

For path completions, include extension as a kindModifier #28148

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

Merged
1 commit merged into from
Oct 30, 2018

Conversation

ghost
Copy link

@ghost ghost commented Oct 26, 2018

Fixes #28116

This does not modify name; instead it adds the extension into kindModifiers.
Note for directories we don't include any extension, even if importing from the directory would resolve to e.g. index.d.ts.
(An alternate fix would be to add new choices of kind, but since every file extension except .json could be associated with either a script or a module, that would to a lot of combinations.)

@ghost ghost force-pushed the pathCompletions_kindModifiers branch 2 times, most recently from 000f4d5 to 53dcb2a Compare October 29, 2018 18:54
@ghost ghost force-pushed the pathCompletions_kindModifiers branch from 53dcb2a to 423be97 Compare October 30, 2018 00:05
@ghost ghost requested review from mjbvz and sheetalkamat October 30, 2018 16:02
Copy link
Contributor

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API changes look good. Agreed that using the kindModifier is better than changing the name. Thanks for looking at this!

@ghost ghost merged commit 437bc41 into master Oct 30, 2018
@ghost ghost deleted the pathCompletions_kindModifiers branch October 30, 2018 18:56
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path suggestion should have path with extension in CompletionEntry.name
2 participants