VS Code C# syntax highlighting bug -




using "visual studio code 1.15.1";

i've been using vscode on mac view c# code had written elsewhere, , reason, things aren't highlighted correctly.

(0) await statements not highlighted correctly when used variable instead of method call or member accessor.

await sometask; // highlighted if sometask variable of type await await something.sometask; // highlighted correctly await something.dosomething(); // highlighted correctly 

(1) using highlighted if function instead of keyword.

using (var spoon = new disposablespoon()) {     // ... } 

which didn't happen before.

(2) c# 7 features aren't highlighted correctly, such out variables.

if (map.trygetvalue(key, out tvalue val)) {     // ... } 

i'm using default theme (dark+), , don't think have major, workspace-breaking plugins enabled (most themes or support other languages). did accidentally mess config or something, or bug?

edit: (1) fixed when change language "c#" "c# (official)". there seem multiple c#'s reason, none seem fix of aforementioned bugs. if due wonky config or something, how revert default?

the await issue seems bug in our built-in c# grammar. i've opened issue grammar use track this: https://github.com/dotnet/csharp-tmlanguage/issues/83

i can repo (1) when not within class or method body, , can't repo (2). can please file issues these well. include code, screenshot, , short explanation of looks incorrect: https://github.com/dotnet/csharp-tmlanguage/issues/new





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -