Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting stops without ; #15

Closed
DustinCampbell opened this issue Jan 27, 2017 · 3 comments
Closed

Syntax highlighting stops without ; #15

DustinCampbell opened this issue Jan 27, 2017 · 3 comments

Comments

@DustinCampbell
Copy link
Member

From @tverboon on January 27, 2017 7:12

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64

VS Code version: 1.8.1
C# Extension version: 1.7.0-beta1

Steps to reproduce

namespace MyTest
{
    public class ColorTest
    {
        private readonly string _color
        public ColorTest(string white)
        {
            _color = white;
        }
    }
}

Expected behavior

This behavior happens when there is a syntax error (missing ;), so this makes it absolutely clear. Maybe it's a feature 😄 Visual Studio syntax highlighting continues to work for other lines, so I guess most users will expect that to be with VS Code also.

Actual behavior

screen shot 2017-01-27 at 08 01 07

Edit: It looks like that it only happens within class block and not in a method:
screen shot 2017-01-27 at 13 57 16

Copied from original issue: dotnet/vscode-csharp#1152

@DustinCampbell DustinCampbell changed the title Syntax highlighting stops without ; in 1.7 beta Syntax highlighting stops without ; Jan 27, 2017
@DustinCampbell
Copy link
Member Author

DustinCampbell commented Jan 27, 2017

Note that VS continues to work because there's a proper parser with good error recovery doing the colorization. In VS Code, this is much trickier because it's all done with regular expressions as part of a TextMate grammar. 😦

@tverboon
Copy link

Thanks! Will create issues like this in this repo next time.

Still waiting for this one, I guess 😉: microsoft/vscode#585

@DustinCampbell
Copy link
Member Author

You can create issues in omnisharp-vscode repo too. This repo is new. The C# TextMate grammar is here so it can easily be shared among VS Code, Atom, VS, Sublime, etc.

Yes, we're definitely pushing for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants