From d49c5f5e5a22b930f5941ba022b9e884e75ec0e5 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 25 Jul 2024 08:34:15 -0400 Subject: [PATCH] Sort imports setting (#582) --- docs/extension-settings.md | 2 ++ package.json | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/extension-settings.md b/docs/extension-settings.md index 8d7e1623..d28dcc60 100644 --- a/docs/extension-settings.md +++ b/docs/extension-settings.md @@ -22,6 +22,8 @@ If true, a space is inserted to the left of an opening function declaration pare ### `brightscript.format.insertSpaceBetweenEmptyCurlyBraces` if true, empty curly braces will contain exactly 1 whitespace char (i.e. `{ }`). If false, there will be zero whitespace chars between empty curly braces (i.e. `{}`) +### `brightscript.format.sortImports` +if true, import statements will be sorted alphabetically. ### `brightscript.output.includeStackTraces` If set to true, will print stack trace or breakpoint info in the log output. Set to false to avoid noisy logs - you'll still get the traces in the debug console, in any case ### `brightscript.output.focusOnLaunch` diff --git a/package.json b/package.json index cec5dd78..001200bf 100644 --- a/package.json +++ b/package.json @@ -1787,6 +1787,12 @@ "original" ], "scope": "resource" + }, + "brightscript.format.sortImports": { + "type": "boolean", + "default": false, + "description": "Sort import statements alphabetically", + "scope": "resource" } } },