Skip to content

Commit e37f2a1

Browse files
committed
feat: option to disable Release Notes
Fixes #675
1 parent 6915323 commit e37f2a1

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12+
- Added option to disable Release Notes from being displayed
13+
([#675](https://github.com/fortran-lang/vscode-fortran-support/issues/675))
1214
- Added support for schema validation of `fpm.toml` files.
1315
- Added local path resolution for `fortls`, `findent` and `fprettify` executables
1416
([#667](https://github.com/fortran-lang/vscode-fortran-support/issues/667))

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,19 @@
513513
}
514514
}
515515
},
516+
{
517+
"id": "notifications",
518+
"title": "Notifications",
519+
"order": 100,
520+
"properties": {
521+
"fortran.notifications.releaseNotes": {
522+
"type": "boolean",
523+
"default": true,
524+
"markdownDescription": "Show release notes when a new version of the extension is installed.",
525+
"order": 0
526+
}
527+
}
528+
},
516529
{
517530
"id": "deprecated",
518531
"title": "Deprecated Options",

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ export async function activate(context: vscode.ExtensionContext) {
107107
context.subscriptions.push(vscode.commands.registerCommand(WhatsNew, showWhatsNew));
108108
// Upon the very first initialisation create a file to indicate that the release
109109
// notes have been shown and not show them again.
110-
if (!fs.existsSync(path.join(__dirname, 'displayReleaseNotes.txt'))) {
110+
if (
111+
!fs.existsSync(path.join(__dirname, 'displayReleaseNotes.txt')) &&
112+
config.get<boolean>('notifications.releaseNotes')
113+
) {
111114
await showWhatsNew();
112115
fs.writeFileSync(path.join(__dirname, 'displayReleaseNotes.txt'), 'false');
113116
}

0 commit comments

Comments
 (0)