Skip to content

Commit 12d9ce1

Browse files
authored
Merge pull request microsoft#227011 from mjbvz/productive-bird
Fix organize imports setting
2 parents 0e542f3 + 3e0761c commit 12d9ce1

File tree

3 files changed

+30
-18
lines changed

3 files changed

+30
-18
lines changed

extensions/typescript-language-features/package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,13 @@
11161116
"inline",
11171117
"first"
11181118
],
1119-
"default": "auto"
1119+
"default": "auto",
1120+
"markdownEnumDescriptions": [
1121+
"%typescript.preferences.organizeImports.typeOrder.auto%",
1122+
"%typescript.preferences.organizeImports.typeOrder.last%",
1123+
"%typescript.preferences.organizeImports.typeOrder.inline%",
1124+
"%typescript.preferences.organizeImports.typeOrder.first%"
1125+
]
11201126
},
11211127
"unicodeCollation": {
11221128
"type": "string",
@@ -1180,7 +1186,13 @@
11801186
"inline",
11811187
"first"
11821188
],
1183-
"default": "auto"
1189+
"default": "auto",
1190+
"markdownEnumDescriptions": [
1191+
"%typescript.preferences.organizeImports.typeOrder.auto%",
1192+
"%typescript.preferences.organizeImports.typeOrder.last%",
1193+
"%typescript.preferences.organizeImports.typeOrder.inline%",
1194+
"%typescript.preferences.organizeImports.typeOrder.first%"
1195+
]
11841196
},
11851197
"unicodeCollation": {
11861198
"type": "string",

extensions/typescript-language-features/package.nls.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,21 @@
188188
"typescript.preferences.renameShorthandProperties.deprecationMessage": "The setting 'typescript.preferences.renameShorthandProperties' has been deprecated in favor of 'typescript.preferences.useAliasesForRenames'",
189189
"typescript.preferences.useAliasesForRenames": "Enable/disable introducing aliases for object shorthand properties during renames.",
190190
"typescript.preferences.renameMatchingJsxTags": "When on a JSX tag, try to rename the matching tag instead of renaming the symbol. Requires using TypeScript 5.1+ in the workspace.",
191-
"typescript.preferences.organizeImports": "Advanced preferences that control how imports are ordered. Presets are available in `#typescript.preferences.organizeImports.presets#`",
192-
"javascript.preferences.organizeImports": "Advanced preferences that control how imports are ordered. Presets are available in `#javascript.preferences.organizeImports.presets#`",
193-
"typescript.preferences.organizeImports.caseSensitivity.auto": "Detect case-sensitivity for import sorting",
194-
"typescript.preferences.organizeImports.caseSensitivity.insensitive": "Sort imports case-insensitively",
195-
"typescript.preferences.organizeImports.caseSensitivity.sensitive": "Sort imports case-sensitively",
196-
"typescript.preferences.organizeImports.typeOrder.auto": "Detect where type-only named imports should be sorted",
197-
"typescript.preferences.organizeImports.typeOrder.last": "Type only named imports are sorted to the end of the import list",
198-
"typescript.preferences.organizeImports.typeOrder.inline": "Named imports are sorted by name only",
199-
"typescript.preferences.organizeImports.typeOrder.first": "Type only named imports are sorted to the end of the import list",
200-
"typescript.preferences.organizeImports.unicodeCollation.ordinal": "Sort imports using the numeric value of each code point",
201-
"typescript.preferences.organizeImports.unicodeCollation.unicode": "Sort imports using the Unicode code collation",
202-
"typescript.preferences.organizeImports.locale": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`",
203-
"typescript.preferences.organizeImports.caseFirst": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`",
204-
"typescript.preferences.organizeImports.numericCollation": "Sort numeric strings by integer value",
205-
"typescript.preferences.organizeImports.accentCollation": "Compare characters with diacritical marks as unequal to base character",
191+
"typescript.preferences.organizeImports": "Advanced preferences that control how imports are ordered.",
192+
"javascript.preferences.organizeImports": "Advanced preferences that control how imports are ordered.",
193+
"typescript.preferences.organizeImports.caseSensitivity.auto": "Detect case-sensitivity for import sorting.",
194+
"typescript.preferences.organizeImports.caseSensitivity.insensitive": "Sort imports case-insensitively.",
195+
"typescript.preferences.organizeImports.caseSensitivity.sensitive": "Sort imports case-sensitively.",
196+
"typescript.preferences.organizeImports.typeOrder.auto": "Detect where type-only named imports should be sorted.",
197+
"typescript.preferences.organizeImports.typeOrder.last": "Type only named imports are sorted to the end of the import list.",
198+
"typescript.preferences.organizeImports.typeOrder.inline": "Named imports are sorted by name only.",
199+
"typescript.preferences.organizeImports.typeOrder.first": "Type only named imports are sorted to the end of the import list.",
200+
"typescript.preferences.organizeImports.unicodeCollation.ordinal": "Sort imports using the numeric value of each code point.",
201+
"typescript.preferences.organizeImports.unicodeCollation.unicode": "Sort imports using the Unicode code collation.",
202+
"typescript.preferences.organizeImports.locale": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`.",
203+
"typescript.preferences.organizeImports.caseFirst": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`.",
204+
"typescript.preferences.organizeImports.numericCollation": "Sort numeric strings by integer value.",
205+
"typescript.preferences.organizeImports.accentCollation": "Compare characters with diacritical marks as unequal to base character.",
206206
"typescript.workspaceSymbols.scope": "Controls which files are searched by [Go to Symbol in Workspace](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name).",
207207
"typescript.workspaceSymbols.scope.allOpenProjects": "Search all open JavaScript or TypeScript projects for symbols.",
208208
"typescript.workspaceSymbols.scope.currentProject": "Only search for symbols in the current JavaScript or TypeScript project.",

extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default class FileConfigurationManager extends Disposable {
201201
interactiveInlayHints: true,
202202
includeCompletionsForModuleExports: config.get<boolean>('suggest.autoImports'),
203203
...getInlayHintsPreferences(config),
204-
...this.getOrganizeImportsPreferences(config),
204+
...this.getOrganizeImportsPreferences(preferencesConfig),
205205
};
206206

207207
return preferences;

0 commit comments

Comments
 (0)