From 3bff9f5b4eaba66384b8c0b0651f40225d03153a Mon Sep 17 00:00:00 2001 From: yioneko Date: Sat, 9 Nov 2024 05:44:26 +0000 Subject: [PATCH] Update config schema --- packages/service/configuration.schema.json | 180 ++++++++++++--------- 1 file changed, 103 insertions(+), 77 deletions(-) diff --git a/packages/service/configuration.schema.json b/packages/service/configuration.schema.json index 74a18504..ddc971f8 100644 --- a/packages/service/configuration.schema.json +++ b/packages/service/configuration.schema.json @@ -614,7 +614,7 @@ "zh-TW" ], "enumDescriptions": [ - "Use VS Code's configured display language", + "Use VS Code's configured display language.", null, null, null, @@ -756,7 +756,7 @@ "none" ], "markdownEnumDescriptions": [ - "Insert `={}` or `=\"\"` after attribute names based on the prop type. See `javascript.preferences.quoteStyle` to control the type of quotes used for string attributes.", + "Insert `={}` or `=\"\"` after attribute names based on the prop type. See `#javascript.preferences.quoteStyle#` to control the type of quotes used for string attributes.", "Insert `={}` after attribute names.", "Only insert attribute names." ], @@ -771,7 +771,7 @@ "none" ], "markdownEnumDescriptions": [ - "Insert `={}` or `=\"\"` after attribute names based on the prop type. See `typescript.preferences.quoteStyle` to control the type of quotes used for string attributes.", + "Insert `={}` or `=\"\"` after attribute names based on the prop type. See `#typescript.preferences.quoteStyle#` to control the type of quotes used for string attributes.", "Insert `={}` after attribute names.", "Only insert attribute names." ], @@ -864,6 +864,7 @@ "properties": { "caseSensitivity": { "type": "string", + "markdownDescription": "Specifies how imports should be sorted with regards to case-sensitivity. If `auto` or unspecified, we will detect the case-sensitivity per file", "enum": [ "auto", "caseInsensitive", @@ -878,6 +879,7 @@ }, "typeOrder": { "type": "string", + "markdownDescription": "Specify how type-only named imports should be sorted.", "enum": [ "auto", "last", @@ -887,13 +889,14 @@ "default": "auto", "markdownEnumDescriptions": [ "Detect where type-only named imports should be sorted.", - "Type only named imports are sorted to the end of the import list.", - "Named imports are sorted by name only.", - "Type only named imports are sorted to the end of the import list." + "Type only named imports are sorted to the end of the import list. E.g. `import { B, Z, type A, type Y } from 'module';`", + "Named imports are sorted by name only. E.g. `import { type A, B, type Y, Z } from 'module';`", + "Type only named imports are sorted to the beginning of the import list. E.g. `import { type A, type Y, B, Z } from 'module';`" ] }, "unicodeCollation": { "type": "string", + "markdownDescription": "Specify whether to sort imports using Unicode or Ordinal collation.", "enum": [ "ordinal", "unicode" @@ -906,24 +909,29 @@ }, "locale": { "type": "string", - "markdownDescription": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Overrides the locale used for collation. Specify `auto` to use the UI locale." }, "numericCollation": { "type": "boolean", - "markdownDescription": "Sort numeric strings by integer value." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Sort numeric strings by integer value." }, "accentCollation": { "type": "boolean", - "markdownDescription": "Compare characters with diacritical marks as unequal to base character." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Compare characters with diacritical marks as unequal to base character." }, "caseFirst": { "type": "string", - "markdownDescription": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`.", + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`, and `organizeImports.caseSensitivity` is not `caseInsensitive`. Indicates whether upper-case will sort before lower-case.", "enum": [ "default", "upper", "lower" ], + "markdownEnumDescriptions": [ + "Default order given by `locale`.", + "Upper-case comes before lower-case. E.g. ` A, a, B, b`.", + "Lower-case comes before upper-case. E.g.` a, A, z, Z`." + ], "default": "default" } } @@ -934,6 +942,7 @@ "properties": { "caseSensitivity": { "type": "string", + "markdownDescription": "Specifies how imports should be sorted with regards to case-sensitivity. If `auto` or unspecified, we will detect the case-sensitivity per file", "enum": [ "auto", "caseInsensitive", @@ -948,6 +957,7 @@ }, "typeOrder": { "type": "string", + "markdownDescription": "Specify how type-only named imports should be sorted.", "enum": [ "auto", "last", @@ -957,13 +967,14 @@ "default": "auto", "markdownEnumDescriptions": [ "Detect where type-only named imports should be sorted.", - "Type only named imports are sorted to the end of the import list.", - "Named imports are sorted by name only.", - "Type only named imports are sorted to the end of the import list." + "Type only named imports are sorted to the end of the import list. E.g. `import { B, Z, type A, type Y } from 'module';`", + "Named imports are sorted by name only. E.g. `import { type A, B, type Y, Z } from 'module';`", + "Type only named imports are sorted to the beginning of the import list. E.g. `import { type A, type Y, B, Z } from 'module';`" ] }, "unicodeCollation": { "type": "string", + "markdownDescription": "Specify whether to sort imports using Unicode or Ordinal collation.", "enum": [ "ordinal", "unicode" @@ -976,24 +987,29 @@ }, "locale": { "type": "string", - "markdownDescription": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Overrides the locale used for collation. Specify `auto` to use the UI locale." }, "numericCollation": { "type": "boolean", - "markdownDescription": "Sort numeric strings by integer value." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Sort numeric strings by integer value." }, "accentCollation": { "type": "boolean", - "markdownDescription": "Compare characters with diacritical marks as unequal to base character." + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`. Compare characters with diacritical marks as unequal to base character." }, "caseFirst": { "type": "string", - "markdownDescription": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`.", + "markdownDescription": "Requires `organizeImports.unicodeCollation: 'unicode'`, and `organizeImports.caseSensitivity` is not `caseInsensitive`. Indicates whether upper-case will sort before lower-case.", "enum": [ "default", "upper", "lower" ], + "markdownEnumDescriptions": [ + "Default order given by `locale`.", + "Upper-case comes before lower-case. E.g. ` A, a, B, b`.", + "Lower-case comes before upper-case. E.g.` a, A, z, Z`." + ], "default": "default" } } @@ -1067,69 +1083,79 @@ "typescript.tsserver.experimental.enableProjectDiagnostics": { "type": "boolean", "default": false, - "description": "(Experimental) Enables project wide error reporting." + "description": "Enables project wide error reporting." }, "typescript.tsserver.watchOptions": { - "type": "object", "description": "Configure which watching strategies should be used to keep track of files and directories.", - "properties": { - "watchFile": { - "type": "string", - "description": "Strategy for how individual files are watched.", - "enum": [ - "fixedChunkSizePolling", - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling", - "useFsEvents", - "useFsEventsOnParentDirectory" - ], - "enumDescriptions": [ - "Polls files in chunks at regular interval.", - "Check every file for changes several times a second at a fixed interval.", - "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", - "Use a dynamic queue where less-frequently modified files will be checked less often.", - "Attempt to use the operating system/file system's native events for file changes.", - "Attempt to use the operating system/file system's native events to listen for changes on a file's containing directories. This can use fewer file watchers, but might be less accurate." - ], - "default": "useFsEvents" - }, - "watchDirectory": { - "type": "string", - "description": "Strategy for how entire directory trees are watched under systems that lack recursive file-watching functionality.", - "enum": [ - "fixedChunkSizePolling", - "fixedPollingInterval", - "dynamicPriorityPolling", - "useFsEvents" - ], - "enumDescriptions": [ - "Polls directories in chunks at regular interval.", - "Check every directory for changes several times a second at a fixed interval.", - "Use a dynamic queue where less-frequently modified directories will be checked less often.", - "Attempt to use the operating system/file system's native events for directory changes." - ], - "default": "useFsEvents" - }, - "fallbackPolling": { + "default": "vscode", + "oneOf": [ + { "type": "string", - "description": "When using file system events, this option specifies the polling strategy that gets used when the system runs out of native file watchers and/or doesn't support native file watchers.", - "enum": [ - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling" - ], - "enumDescriptions": [ - "Check every file for changes several times a second at a fixed interval.", - "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", - null - ] + "const": "vscode", + "description": "%configuration.tsserver.watchOptions.vscode%" }, - "synchronousWatchDirectory": { - "type": "boolean", - "description": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups." + { + "type": "object", + "properties": { + "watchFile": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.watchFile%", + "enum": [ + "fixedChunkSizePolling", + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling", + "useFsEvents", + "useFsEventsOnParentDirectory" + ], + "enumDescriptions": [ + "%configuration.tsserver.watchOptions.watchFile.fixedChunkSizePolling%", + "%configuration.tsserver.watchOptions.watchFile.fixedPollingInterval%", + "%configuration.tsserver.watchOptions.watchFile.priorityPollingInterval%", + "%configuration.tsserver.watchOptions.watchFile.dynamicPriorityPolling%", + "%configuration.tsserver.watchOptions.watchFile.useFsEvents%", + "%configuration.tsserver.watchOptions.watchFile.useFsEventsOnParentDirectory%" + ], + "default": "useFsEvents" + }, + "watchDirectory": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.watchDirectory%", + "enum": [ + "fixedChunkSizePolling", + "fixedPollingInterval", + "dynamicPriorityPolling", + "useFsEvents" + ], + "enumDescriptions": [ + "%configuration.tsserver.watchOptions.watchDirectory.fixedChunkSizePolling%", + "%configuration.tsserver.watchOptions.watchDirectory.fixedPollingInterval%", + "%configuration.tsserver.watchOptions.watchDirectory.dynamicPriorityPolling%", + "%configuration.tsserver.watchOptions.watchDirectory.useFsEvents%" + ], + "default": "useFsEvents" + }, + "fallbackPolling": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.fallbackPolling%", + "enum": [ + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling" + ], + "enumDescriptions": [ + "configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval", + "configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval", + "configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling" + ] + }, + "synchronousWatchDirectory": { + "type": "boolean", + "description": "%configuration.tsserver.watchOptions.synchronousWatchDirectory%" + } + } } - } + ] }, "typescript.workspaceSymbols.scope": { "type": "string", @@ -1181,17 +1207,17 @@ "typescript.preferGoToSourceDefinition": { "type": "boolean", "default": false, - "description": "Makes Go to Definition avoid type declaration files when possible by triggering Go to Source Definition instead. This allows Go to Source Definition to be triggered with the mouse gesture." + "description": "Makes `Go to Definition` avoid type declaration files when possible by triggering `Go to Source Definition` instead. This allows `Go to Source Definition` to be triggered with the mouse gesture." }, "javascript.preferGoToSourceDefinition": { "type": "boolean", "default": false, - "description": "Makes Go to Definition avoid type declaration files when possible by triggering Go to Source Definition instead. This allows Go to Source Definition to be triggered with the mouse gesture." + "description": "Makes `Go to Definition` avoid type declaration files when possible by triggering `Go to Source Definition` instead. This allows `Go to Source Definition` to be triggered with the mouse gesture." }, "typescript.workspaceSymbols.excludeLibrarySymbols": { "type": "boolean", "default": true, - "markdownDescription": "Exclude symbols that come from library files in Go to Symbol in Workspace results. Requires using TypeScript 5.3+ in the workspace." + "markdownDescription": "Exclude symbols that come from library files in `Go to Symbol in Workspace` results. Requires using TypeScript 5.3+ in the workspace." }, "vtsls.javascript.format.baseIndentSize": { "type": "number"