-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Improve TS auto import label #98228
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Since #100832 was closed (with reference to some obscure problem from 2017), this ticket is the closest I could come to the new issue. Snippets for PS/XML and other languages. (Sample image included) Alternative fixes :
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just a heads-up that for the suggest widget and its details parts are going to be resizable. See #29126. This issue will all about the specific TS case and how to improve the situation for auto-importing modules |
@mjbvz There might be more to it and things I don't know esp. the doc for diff --git a/extensions/typescript-language-features/src/languageFeatures/completions.ts b/extensions/typescript-language-features/src/languageFeatures/completions.ts
index 73f54f20c6..bf6916c925 100644
--- a/extensions/typescript-language-features/src/languageFeatures/completions.ts
+++ b/extensions/typescript-language-features/src/languageFeatures/completions.ts
@@ -62,6 +62,9 @@ class MyCompletionItem extends vscode.CompletionItem {
// De-prioritze auto-imports
// https://github.com/microsoft/vscode/issues/40311
this.sortText = '\uffff' + tsEntry.sortText;
+
+ this.label2 = { name: tsEntry.name, qualifier: vscode.workspace.asRelativePath(tsEntry.source) };
+
} else {
this.sortText = tsEntry.sortText;
} |
Steps to Reproduce:
Recently, the autocomplete auto import text has become cropped so short as to be completely useless. In many cases over the past couple of days, I've had the option to import 2-4 same-named classes/components. Normally, I can select the correct one based on the additional text
Now the package name is cropped to the same text for all options:
This makes the auto-import feature completely useless (one of the most important features in an IDE).
See example:
(It may be that additional conditions apply, for example what the other options presented in the list would be.)
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: