mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-31 08:07:10 -05:00
Organize imports collation (#52115)
This commit is contained in:
@@ -3516,7 +3516,60 @@ export interface UserPreferences {
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
|
||||
/**
|
||||
* Indicates whether imports should be organized in a case-insensitive manner.
|
||||
*/
|
||||
readonly organizeImportsIgnoreCase?: "auto" | boolean;
|
||||
/**
|
||||
* Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value
|
||||
* of their code points, or via "unicode" collation (via the
|
||||
* [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale
|
||||
* specified in {@link organizeImportsCollationLocale}.
|
||||
*
|
||||
* Default: `"ordinal"`.
|
||||
*/
|
||||
readonly organizeImportsCollation?: "ordinal" | "unicode";
|
||||
/**
|
||||
* Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant
|
||||
* for the sake of consistent sorting. Use `"auto"` to use the detected UI locale.
|
||||
*
|
||||
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
||||
*
|
||||
* Default: `"en"`
|
||||
*/
|
||||
readonly organizeImportsCollationLocale?: string;
|
||||
/**
|
||||
* Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate
|
||||
* strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`.
|
||||
*
|
||||
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
readonly organizeImportsNumericCollation?: boolean;
|
||||
/**
|
||||
* Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When
|
||||
* `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified
|
||||
* in {@link organizeImportsCollationLocale}.
|
||||
*
|
||||
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
readonly organizeImportsAccentCollation?: boolean;
|
||||
/**
|
||||
* Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale
|
||||
* specified in {@link organizeImportsCollationLocale} is used.
|
||||
*
|
||||
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also
|
||||
* ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`,
|
||||
* or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be
|
||||
* case-insensitive.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
|
||||
|
||||
/**
|
||||
* Indicates whether {@link ReferencesResponseItem.lineText} is supported.
|
||||
|
||||
Reference in New Issue
Block a user