Skip to content

Commit

Permalink
Disable formatting & diagnostics by default (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
badsyntax committed Oct 22, 2020
1 parent 689a1f3 commit c327fb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ Before using this extension, ensure you've [configured Spotless](https://github.

### Enabling Spotless

Spotless formatting & diagnostics are enabled by default. Change the settings to adjust this behaviour:
Spotless formatting & diagnostics are _disabled by default_. Change the settings to adjust this behaviour:

```json
{
"spotlessGradle.format.enable": false,
"spotlessGradle.diagnostics.enable": false,
"[java]": {
"spotlessGradle.format.enable": true,
"spotlessGradle.diagnostics.enable": true
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
"properties": {
"spotlessGradle.format.enable": {
"type": "boolean",
"default": true,
"default": false,
"scope": "language-overridable",
"description": "Enable/disable formatting"
},
"spotlessGradle.diagnostics.enable": {
"type": "boolean",
"default": true,
"default": false,
"scope": "language-overridable",
"description": "Enable/disable diagnostics"
}
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getConfigFormatEnable(
): boolean {
return vscode.workspace
.getConfiguration(CONFIG_NAMESPACE, workspaceFolder.uri)
.get<boolean>(CONFIG_FORMAT_ENABLE, true);
.get<boolean>(CONFIG_FORMAT_ENABLE, false);
}

export function getConfigLangOverrideFormatEnable(
Expand All @@ -30,7 +30,7 @@ export function getConfigDiagnosticsEnable(
): boolean {
return vscode.workspace
.getConfiguration(CONFIG_NAMESPACE, workspaceFolder.uri)
.get<boolean>(CONFIG_DIAGNOSTICS_ENABLE, true);
.get<boolean>(CONFIG_DIAGNOSTICS_ENABLE, false);
}

export function getConfigLangOverrideDiagnosticsEnable(
Expand Down

0 comments on commit c327fb0

Please sign in to comment.