Skip to content

Commit

Permalink
Rename setting
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Feb 8, 2024
1 parent 10feada commit 9885716
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions packages/metals-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@
"configuration": {
"title": "Metals",
"properties": {
"metals.hotCodeReplace": {
"type": "boolean",
"default": false,
"markdownDescription": "Allow Hot Code Replace (HCR) while debugging"
},
"metals.serverVersion": {
"type": "string",
"default": "1.2.1",
Expand Down Expand Up @@ -348,6 +343,11 @@
"default": false,
"markdownDescription": "When this option is enabled, when user pastes any snippet into a Scala file, Metals will try to adjust the indentation to that of the current cursor."
},
"metals.debug.hotCodeReplace": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable Hot Code Replace while debugging."
},
"metals.verboseCompilation": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -1113,4 +1113,4 @@
"extensionPack": [
"scala-lang.scala"
]
}
}
6 changes: 3 additions & 3 deletions packages/metals-vscode/src/hotCodeReplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as vscode from "vscode";

import { DebugSession, commands } from "vscode";

const HCR_CONFIG = "metals.hotCodeReplace";
const HCR_CONFIG = "metals.debug.hotCodeReplace";
const HCR_ACTIVE = "scalaHotReloadOn";

export function initializeHotCodeReplace() {
Expand Down Expand Up @@ -45,7 +45,7 @@ export async function applyHCR() {
vscode.window
.showWarningMessage(
"Failed to apply the changes because hot code replace is not supported by run mode, " +
"would you like to restart the program?"
"would you like to restart the program?"
)
.then((res) => {
if (res === "Yes") {
Expand Down Expand Up @@ -84,4 +84,4 @@ export async function applyHCR() {
}

const hotReplaceIsOn = () =>
vscode.workspace.getConfiguration("metals").get("hotCodeReplace") ?? false;
vscode.workspace.getConfiguration("metals").get(HCR_CONFIG) ?? false;

0 comments on commit 9885716

Please sign in to comment.