Skip to content

Commit

Permalink
Hot Reload = Fuse On (#7873)
Browse files Browse the repository at this point in the history
Sets it so that if a user does not have fuse set in their configuration then the hot reload setting is used
  • Loading branch information
ryzngard authored Dec 17, 2024
1 parent 67ee0cb commit 9641f9f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@
"razor.languageServer.forceRuntimeCodeGeneration": {
"type": "boolean",
"scope": "machine-overridable",
"default": false,
"default": null,
"description": "%configuration.razor.languageServer.forceRuntimeCodeGeneration%",
"order": 90
},
Expand Down Expand Up @@ -5585,4 +5585,4 @@
}
}
}
}
}
14 changes: 13 additions & 1 deletion src/razor/src/razorLanguageServerOptionsResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ export function resolveRazorLanguageServerOptions(
const debugLanguageServer = serverConfig.get<boolean>('debug');
const usingOmniSharp =
!getCSharpDevKit() && vscodeApi.workspace.getConfiguration().get<boolean>('dotnet.server.useOmnisharp');
const forceRuntimeCodeGeneration = serverConfig.get<boolean>('forceRuntimeCodeGeneration');

const hotReload = vscodeApi.workspace.getConfiguration('csharp.experimental.debug').get<boolean>('hotReload');

let forceRuntimeCodeGeneration = serverConfig.get<boolean | null>('forceRuntimeCodeGeneration');

if (forceRuntimeCodeGeneration === null && hotReload) {
logger.logMessage(
'Hot Reload is enabled so treating "razor.languageServer.forceRuntimeCodeGeneration" as true. To override this set "razor.languageServer.forceRuntimeCodeGeneration" to true or false.'
);

forceRuntimeCodeGeneration = hotReload;
}

const useRoslynTokenizer = serverConfig.get<boolean>('useRoslynTokenizer');
const suppressErrorToasts = serverConfig.get<boolean>('suppressLspErrorToasts');

Expand Down

0 comments on commit 9641f9f

Please sign in to comment.