From d32588cd609087e48ec770995221d40d921f12ed Mon Sep 17 00:00:00 2001 From: Elias Papavasileiou Date: Sat, 28 Sep 2024 20:45:12 +0300 Subject: [PATCH 1/3] fix: improve settings descriptions for actions trigged on save --- .../contrib/codeActions/browser/codeActionsContribution.ts | 4 ++-- src/vs/workbench/contrib/files/browser/files.contribution.ts | 2 +- .../contrib/notebook/browser/notebook.contribution.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts index 0bd3a24a6fc20..bd1b818cc7ff1 100644 --- a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts +++ b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts @@ -64,7 +64,7 @@ const codeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. Example: `"source.organizeImports": "explicit" `'), + markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will run when the file is saved explicitly, not when saved automatically. Example: `"source.organizeImports": "explicit" `'), type: ['object', 'array'], additionalProperties: { type: 'string', @@ -94,7 +94,7 @@ const notebookCodeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified, the file must not be saved after delay, and the editor must not be shutting down. Example: `"notebook.source.organizeImports": "explicit"`'), + markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will run when the file is saved explicitly, not when saved automatically. Example: `"notebook.source.organizeImports": "explicit"`'), type: 'object', additionalProperties: { type: ['string', 'boolean'], diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index 250bb0c060a94..00d058d5ce9b4 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -380,7 +380,7 @@ configurationRegistry.registerConfiguration({ properties: { 'editor.formatOnSave': { 'type': 'boolean', - 'description': nls.localize('formatOnSave', "Format a file on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down."), + 'markdownDescription': nls.localize('formatOnSave', "Format a file on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will be formatted when saved explicitly, not when saved automatically."), 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE, }, 'editor.formatOnSaveMode': { diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 857c3a95aa0d5..2dab9a381d0d2 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -1141,7 +1141,7 @@ configurationRegistry.registerConfiguration({ markdownEnumDescriptions: DefaultFormatter.extensionDescriptions }, [NotebookSetting.formatOnSave]: { - markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down."), + markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will be formatted when saved explicitly, not when saved automatically."), type: 'boolean', tags: ['notebookLayout'], default: false From 2de9ac09b81fe90e391ce9a846eaf3d175ffdf32 Mon Sep 17 00:00:00 2001 From: Elias Papavasileiou Date: Sat, 12 Oct 2024 00:56:09 +0300 Subject: [PATCH 2/3] fix: improve phrasing in settings descriptions --- .../contrib/codeActions/browser/codeActionsContribution.ts | 4 ++-- src/vs/workbench/contrib/files/browser/files.contribution.ts | 2 +- .../contrib/notebook/browser/notebook.contribution.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts index bd1b818cc7ff1..d71b736bb7cbc 100644 --- a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts +++ b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts @@ -64,7 +64,7 @@ const codeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will run when the file is saved explicitly, not when saved automatically. Example: `"source.organizeImports": "explicit" `'), + markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"source.organizeImports": "explicit" `'), type: ['object', 'array'], additionalProperties: { type: 'string', @@ -94,7 +94,7 @@ const notebookCodeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will run when the file is saved explicitly, not when saved automatically. Example: `"notebook.source.organizeImports": "explicit"`'), + markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"notebook.source.organizeImports": "explicit"`'), type: 'object', additionalProperties: { type: ['string', 'boolean'], diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index 00d058d5ce9b4..71b8588d01a98 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -380,7 +380,7 @@ configurationRegistry.registerConfiguration({ properties: { 'editor.formatOnSave': { 'type': 'boolean', - 'markdownDescription': nls.localize('formatOnSave', "Format a file on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will be formatted when saved explicitly, not when saved automatically."), + 'markdownDescription': nls.localize('formatOnSave', "Format a file on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will only be formatted when saved explicitly."), 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE, }, 'editor.formatOnSaveMode': { diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 2dab9a381d0d2..312bb84e39333 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -1141,7 +1141,7 @@ configurationRegistry.registerConfiguration({ markdownEnumDescriptions: DefaultFormatter.extensionDescriptions }, [NotebookSetting.formatOnSave]: { - markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will be formatted when saved explicitly, not when saved automatically."), + markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will only be formatted when saved explicitly."), type: 'boolean', tags: ['notebookLayout'], default: false From 242ad96658acb2a78dd4bae708c4139834464856 Mon Sep 17 00:00:00 2001 From: Elias Papavasileiou Date: Sat, 12 Oct 2024 01:36:41 +0300 Subject: [PATCH 3/3] fix: replace docs link with setting link --- .../contrib/codeActions/browser/codeActionsContribution.ts | 4 ++-- src/vs/workbench/contrib/files/browser/files.contribution.ts | 2 +- .../contrib/notebook/browser/notebook.contribution.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts index d71b736bb7cbc..c234675847d29 100644 --- a/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts +++ b/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts @@ -64,7 +64,7 @@ const codeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"source.organizeImports": "explicit" `'), + markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. When `#files.autoSave#` is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"source.organizeImports": "explicit" `'), type: ['object', 'array'], additionalProperties: { type: 'string', @@ -94,7 +94,7 @@ const notebookCodeActionsOnSaveSchema: IConfigurationPropertySchema = { items: { type: 'string' } } ], - markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"notebook.source.organizeImports": "explicit"`'), + markdownDescription: nls.localize('notebook.codeActionsOnSave', 'Run a series of Code Actions for a notebook on save. Code Actions must be specified and the editor must not be shutting down. When `#files.autoSave#` is set to `afterDelay`, Code Actions will only be run when the file is saved explicitly. Example: `"notebook.source.organizeImports": "explicit"`'), type: 'object', additionalProperties: { type: ['string', 'boolean'], diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index 71b8588d01a98..c94b33a654072 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -380,7 +380,7 @@ configurationRegistry.registerConfiguration({ properties: { 'editor.formatOnSave': { 'type': 'boolean', - 'markdownDescription': nls.localize('formatOnSave', "Format a file on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will only be formatted when saved explicitly."), + 'markdownDescription': nls.localize('formatOnSave', "Format a file on save. A formatter must be available and the editor must not be shutting down. When `#files.autoSave#` is set to `afterDelay`, the file will only be formatted when saved explicitly."), 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE, }, 'editor.formatOnSaveMode': { diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 312bb84e39333..db3789f1f21c1 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -1141,7 +1141,7 @@ configurationRegistry.registerConfiguration({ markdownEnumDescriptions: DefaultFormatter.extensionDescriptions }, [NotebookSetting.formatOnSave]: { - markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available and the editor must not be shutting down. When [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) is set to `afterDelay`, the file will only be formatted when saved explicitly."), + markdownDescription: nls.localize('notebook.formatOnSave', "Format a notebook on save. A formatter must be available and the editor must not be shutting down. When `#files.autoSave#` is set to `afterDelay`, the file will only be formatted when saved explicitly."), type: 'boolean', tags: ['notebookLayout'], default: false