-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Domain: Auto-importDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
In #44713, we started to do partial resolutions of paths for auto-import completions. This is great, however, it would be nice if we could do a small amount of work for common cases just to clean up paths that go through node_modules
even without further keystrokes.
- In cases where the resolution strategy is
node
and there are no path mappings, we could try to rewrite some number of dotted segments, followed bynode_modules
intopackage_name/...
until fully resolved. - In other cases, we could even just use
containingFolderName/filename
Of course, there are risks here since in JS, string math isn't always cheap. In cases where you have hundreds of thousands of auto-imports from node_modules
, this could still get expensive.
andrewbranch and whzx5byb
Metadata
Metadata
Assignees
Labels
Domain: Auto-importDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript