Provide better displays for paths when not fully resolved #45494
Labels
Domain: Auto-import
Domain: Completion Lists
The issue relates to showing completion lists in an editor
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
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.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.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.The text was updated successfully, but these errors were encountered: