You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: port upstream tsserver settings from typescript-language-features
Sync portable features from the latest VS Code upstream by source
comparison, preserving all coc-specific behavior:
- add typescript/javascript.format.indentSwitchCase format option
- add typescript/javascript.preferences.autoImportSpecifierExcludeRegexes
- add typescript/javascript.preferences.organizeImports.* preferences
(unicodeCollation, caseSensitivity, typeOrder, caseFirst,
accentCollation, locale, numericCollation)
- add implementationsCodeLens.showOnInterfaceMethods and
showOnAllClassMethods filtering
- add typescript.workspaceSymbols.excludeLibrarySymbols and send
excludeLibrarySymbolsInNavTo in configure preferences
Add coc-test unit tests covering each ported feature.
Copy file name to clipboardExpand all lines: Readme.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,8 @@ Checkout `:h coc-configuration` for guide of coc.nvim's configuration.
147
147
-`typescript.updateImportsOnFileMove.enabled`: Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Default: `"prompt"`
148
148
Valid options: ["prompt","always","never"]
149
149
-`typescript.implementationsCodeLens.enabled`: Enable codeLens for implementations Default: `false`
150
+
-`typescript.implementationsCodeLens.showOnInterfaceMethods`: Show implementations CodeLens on interface methods. Default: `false`
151
+
-`typescript.implementationsCodeLens.showOnAllClassMethods`: Show implementations CodeLens on all class methods. Default: `false`
150
152
-`typescript.referencesCodeLens.enabled`: Enable codeLens for references Default: `false`
151
153
-`typescript.referencesCodeLens.showOnAllFunctions`: Enable/disable references CodeLens on all functions in typescript files. Default: `false`
152
154
-`typescript.preferences.importModuleSpecifier`: Preferred path style for auto imports. Default: `"shortest"`
@@ -161,6 +163,8 @@ Checkout `:h coc-configuration` for guide of coc.nvim's configuration.
161
163
Valid options: ["auto","single","double"]
162
164
-`typescript.preferences.useAliasesForRenames`: Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace. Default: `true`
163
165
-`typescript.preferences.autoImportFileExcludePatterns`: Specify glob patterns of files to exclude from auto imports. Requires using TypeScript 4.8 or newer in the workspace.
166
+
-`typescript.preferences.autoImportSpecifierExcludeRegexes`: Specify regular expressions for restricting auto imports. Requires using TypeScript 5.9+ in the workspace.
167
+
-`typescript.preferences.organizeImports`: Controls how Organize Imports sorts imports (`unicodeCollation`, `caseSensitivity`, `typeOrder`, `caseFirst`, `accentCollation`, `locale`, `numericCollation`).
164
168
-`typescript.preferences.preferTypeOnlyAutoImports`: Include the `type` keyword in auto-imports whenever possible. Requires using TypeScript 5.3+ in the workspace.
165
169
-`typescript.preferences.renameShorthandProperties`: Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace. Default: `true`
166
170
-`typescript.suggestionActions.enabled`: Enable/disable suggestion diagnostics for TypeScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace. Default: `true`
@@ -192,16 +196,20 @@ Checkout `:h coc-configuration` for guide of coc.nvim's configuration.
192
196
-`typescript.format.placeOpenBraceOnNewLineForControlBlocks`: Defines whether an open brace is put onto a new line for control blocks or not. Default: `false`
193
197
-`typescript.format.semicolons`: Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace. Default: `"ignore"`
194
198
Valid options: ["ignore","insert","remove"]
199
+
-`typescript.format.indentSwitchCase`: Defines whether an indent is inserted when a `case` or `default` clause is inside a `switch` statement. Default: `true`
195
200
-`typescript.suggest.includeAutomaticOptionalChainCompletions`: Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled. Default: `true`
196
201
-`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). Default: `"allOpenProjects"`
-`typescript.workspaceSymbols.excludeLibrarySymbols`: Exclude symbols from library files (e.g. `node_modules`) when searching for symbols in the workspace. Default: `true`
198
204
-`typescript.autoClosingTags`: Enable/disable automatic closing of JSX tags. Default: `true`
199
205
-`typescript.preferGoToSourceDefinition`: Makes Go to Definition avoid type declaration files when possible by triggering Go to Source Definition instead. Requires using TypeScript 4.7+ in the workspace. Default: `false`
200
206
-`javascript.showUnused`: Show unused variable hint. Default: `true`
201
207
-`javascript.showDeprecated`: Show deprecated variable hint. Default: `true`
202
208
-`javascript.updateImportsOnFileMove.enabled`: Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Default: `"prompt"`
203
209
Valid options: ["prompt","always","never"]
204
210
-`javascript.implementationsCodeLens.enabled`: Enable/disable implementations CodeLens. This CodeLens shows the implementers of an interface. Default: `false`
211
+
-`javascript.implementationsCodeLens.showOnInterfaceMethods`: Show implementations CodeLens on interface methods. Default: `false`
212
+
-`javascript.implementationsCodeLens.showOnAllClassMethods`: Show implementations CodeLens on all class methods. Default: `false`
205
213
-`javascript.referencesCodeLens.enabled`: Enable/disable references CodeLens in JavaScript files. Default: `false`
206
214
-`javascript.referencesCodeLens.showOnAllFunctions`: Enable/disable references CodeLens on all functions in JavaScript files. Default: `false`
207
215
-`javascript.preferences.importModuleSpecifier`: Preferred path style for auto imports. Default: `"shortest"`
@@ -214,6 +222,8 @@ Checkout `:h coc-configuration` for guide of coc.nvim's configuration.
214
222
Valid options: ["auto","single","double"]
215
223
-`javascript.preferences.useAliasesForRenames`: Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace. Default: `true`
216
224
-`javascript.preferences.autoImportFileExcludePatterns`: Specify glob patterns of files to exclude from auto imports. Requires using TypeScript 4.8 or newer in the workspace.
225
+
-`javascript.preferences.autoImportSpecifierExcludeRegexes`: Specify regular expressions for restricting auto imports. Requires using TypeScript 5.9+ in the workspace.
226
+
-`javascript.preferences.organizeImports`: Controls how Organize Imports sorts imports (`unicodeCollation`, `caseSensitivity`, `typeOrder`, `caseFirst`, `accentCollation`, `locale`, `numericCollation`).
217
227
-`javascript.preferences.renameShorthandProperties`: Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace. Default: `true`
-`javascript.suggestionActions.enabled`: Enable/disable suggestion diagnostics for JavaScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace. Default: `true`
@@ -265,6 +275,7 @@ Checkout `:h coc-configuration` for guide of coc.nvim's configuration.
265
275
-`javascript.preferGoToSourceDefinition`: Makes Go to Definition avoid type declaration files when possible by triggering Go to Source Definition instead. Requires using TypeScript 4.7+ in the workspace. Default: `false`
266
276
-`javascript.format.semicolons`: Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace. Default: `"ignore"`
267
277
Valid options: ["ignore","insert","remove"]
278
+
-`javascript.format.indentSwitchCase`: Defines whether an indent is inserted when a `case` or `default` clause is inside a `switch` statement. Default: `true`
268
279
-`javascript.suggest.completeJSDocs`: Enable/disable suggestion to complete JSDoc comments. Default: `true`
269
280
-`typescript.suggest.completeJSDocs`: Enable/disable suggestion to complete JSDoc comments. Default: `true`
270
281
-`javascript.suggest.objectLiteralMethodSnippets.enabled`: Enable/disable snippet completions for methods in object literals. Requires using TypeScript 4.7+ in the workspace Default: `true`
"markdownDescription": "Specify regular expressions for restricting auto imports. Auto imports will be excluded when the import specifier matches the regular expressions. Requires using TypeScript 5.9 or newer in the workspace.",
554
+
"scope": "resource"
555
+
},
556
+
"typescript.preferences.organizeImports": {
557
+
"type": "object",
558
+
"markdownDescription": "Controls how `Organize Imports` sorts imports.",
559
+
"properties": {
560
+
"caseSensitivity": {
561
+
"type": "string",
562
+
"enum": [
563
+
"auto",
564
+
"caseInsensitive",
565
+
"caseSensitive"
566
+
],
567
+
"default": "auto",
568
+
"markdownEnumDescriptions": [
569
+
"Uses TypeScript defaults.",
570
+
"Treats all imports as case insensitive.",
571
+
"Treats all imports as case sensitive."
572
+
]
573
+
},
574
+
"typeOrder": {
575
+
"type": "string",
576
+
"enum": [
577
+
"auto",
578
+
"last",
579
+
"inline",
580
+
"first"
581
+
],
582
+
"default": "auto",
583
+
"markdownEnumDescriptions": [
584
+
"Uses TypeScript defaults.",
585
+
"Sort type-only imports last.",
586
+
"Sort type-only imports inline.",
587
+
"Sort type-only imports first."
588
+
]
589
+
},
590
+
"unicodeCollation": {
591
+
"type": "string",
592
+
"enum": [
593
+
"ordinal",
594
+
"unicode"
595
+
],
596
+
"default": "ordinal",
597
+
"markdownEnumDescriptions": [
598
+
"Uses TypeScript defaults.",
599
+
"Uses Unicode collation."
600
+
]
601
+
},
602
+
"locale": {
603
+
"type": "string",
604
+
"markdownDescription": "Locale used for organizing imports when using unicode collation."
605
+
},
606
+
"numericCollation": {
607
+
"type": "boolean",
608
+
"markdownDescription": "Compare number sequences numerically when using unicode collation."
609
+
},
610
+
"accentCollation": {
611
+
"type": "boolean",
612
+
"markdownDescription": "Accent-insensitive compare when using unicode collation."
"markdownDescription": "Specify regular expressions for restricting auto imports. Auto imports will be excluded when the import specifier matches the regular expressions. Requires using TypeScript 5.9 or newer in the workspace.",
1006
+
"scope": "resource"
1007
+
},
1008
+
"javascript.preferences.organizeImports": {
1009
+
"type": "object",
1010
+
"markdownDescription": "Controls how `Organize Imports` sorts imports.",
1011
+
"properties": {
1012
+
"caseSensitivity": {
1013
+
"type": "string",
1014
+
"enum": [
1015
+
"auto",
1016
+
"caseInsensitive",
1017
+
"caseSensitive"
1018
+
],
1019
+
"default": "auto",
1020
+
"markdownEnumDescriptions": [
1021
+
"Uses TypeScript defaults.",
1022
+
"Treats all imports as case insensitive.",
1023
+
"Treats all imports as case sensitive."
1024
+
]
1025
+
},
1026
+
"typeOrder": {
1027
+
"type": "string",
1028
+
"enum": [
1029
+
"auto",
1030
+
"last",
1031
+
"inline",
1032
+
"first"
1033
+
],
1034
+
"default": "auto",
1035
+
"markdownEnumDescriptions": [
1036
+
"Uses TypeScript defaults.",
1037
+
"Sort type-only imports last.",
1038
+
"Sort type-only imports inline.",
1039
+
"Sort type-only imports first."
1040
+
]
1041
+
},
1042
+
"unicodeCollation": {
1043
+
"type": "string",
1044
+
"enum": [
1045
+
"ordinal",
1046
+
"unicode"
1047
+
],
1048
+
"default": "ordinal",
1049
+
"markdownEnumDescriptions": [
1050
+
"Uses TypeScript defaults.",
1051
+
"Uses Unicode collation."
1052
+
]
1053
+
},
1054
+
"locale": {
1055
+
"type": "string",
1056
+
"markdownDescription": "Locale used for organizing imports when using unicode collation."
1057
+
},
1058
+
"numericCollation": {
1059
+
"type": "boolean",
1060
+
"markdownDescription": "Compare number sequences numerically when using unicode collation."
1061
+
},
1062
+
"accentCollation": {
1063
+
"type": "boolean",
1064
+
"markdownDescription": "Accent-insensitive compare when using unicode collation."
0 commit comments