Skip to content

Commit 0d76e4c

Browse files
committed
Remove old feature flag, and add new one
1 parent 9e5c75c commit 0d76e4c

File tree

5 files changed

+11
-18
lines changed

5 files changed

+11
-18
lines changed

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,17 +1513,15 @@
15131513
"description": "%configuration.razor.languageServer.forceRuntimeCodeGeneration%",
15141514
"order": 90
15151515
},
1516-
"razor.languageServer.useRoslynTokenizer": {
1517-
"type": "boolean",
1518-
"scope": "machine-overridable",
1519-
"default": false,
1520-
"markdownDescription": "%configuration.razor.languageServer.useRoslynTokenizer%",
1521-
"order": 90
1522-
},
15231516
"razor.languageServer.suppressLspErrorToasts": {
15241517
"type": "boolean",
15251518
"default": true,
15261519
"description": "%configuration.razor.languageServer.suppressLspErrorToasts%"
1520+
},
1521+
"razor.languageServer.useNewFormattingEngine": {
1522+
"type": "boolean",
1523+
"default": true,
1524+
"description": "%configuration.razor.languageServer.useNewFormattingEngine%"
15271525
}
15281526
}
15291527
},

package.nls.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,8 @@
128128
"configuration.razor.languageServer.debug": "Specifies whether to wait for debug attach when launching the language server.",
129129
"configuration.razor.server.trace": "Specifies the logging level to use for the Razor server.",
130130
"configuration.razor.languageServer.forceRuntimeCodeGeneration": "(EXPERIMENTAL) Enable combined design time/runtime code generation for Razor files",
131-
"configuration.razor.languageServer.useRoslynTokenizer": {
132-
"message": "(EXPERIMENTAL) Use the C# tokenizer for Razor files in the IDE. Enables some new C# features, like interpolated and raw strings, in Razor files opened in Visual Studio Code. This matches using `<features>use-roslyn-tokenizer</feature>` in a `.csproj` file for command line builds, and may result in inconsistencies if this option and your project files do not match.",
133-
"comment": [
134-
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
135-
]
136-
},
137131
"configuration.razor.languageServer.suppressLspErrorToasts": "Suppresses error toasts from showing up if the server encounters a recoverable error.",
132+
"configuration.razor.languageServer.useNewFormattingEngine": "Use the new Razor formatting engine.",
138133
"debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Launch Executable file (Console)",
139134
"debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Launch Executable file (Web)",
140135
"debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Attach to a .NET process",

src/razor/src/razorLanguageServerClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ export class RazorLanguageServerClient implements vscode.Disposable {
267267
args.push('true');
268268
}
269269

270-
if (options.useRoslynTokenizer) {
271-
args.push('--UseRoslynTokenizer');
270+
if (options.useNewFormattingEngine) {
271+
args.push('--UseNewFormattingEngine');
272272
args.push('true');
273273
}
274274

src/razor/src/razorLanguageServerOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export interface RazorLanguageServerOptions {
1111
debug?: boolean;
1212
usingOmniSharp: boolean;
1313
forceRuntimeCodeGeneration: boolean;
14-
useRoslynTokenizer: boolean;
1514
suppressErrorToasts: boolean;
15+
useNewFormattingEngine: boolean;
1616
}

src/razor/src/razorLanguageServerOptionsResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ export function resolveRazorLanguageServerOptions(
3535
forceRuntimeCodeGeneration = hotReload;
3636
}
3737

38-
const useRoslynTokenizer = serverConfig.get<boolean>('useRoslynTokenizer');
3938
const suppressErrorToasts = serverConfig.get<boolean>('suppressLspErrorToasts');
39+
const useNewFormattingEngine = serverConfig.get<boolean>('useNewFormattingEngine');
4040

4141
return {
4242
serverPath: languageServerExecutablePath,
4343
debug: debugLanguageServer,
4444
outputChannel: logger.outputChannel,
4545
usingOmniSharp,
4646
forceRuntimeCodeGeneration,
47-
useRoslynTokenizer,
4847
suppressErrorToasts,
48+
useNewFormattingEngine,
4949
} as RazorLanguageServerOptions;
5050
}
5151

0 commit comments

Comments
 (0)