microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
747 stars 245 forks source link

Wrong Color for Enum Value - AL Language Syntax Highlights for Microsoft Dynamics 365 Business Central #7789

Open pri-kise opened 4 months ago

pri-kise commented 4 months ago

Please include the following with each issue:

1. Describe the bug The enum value isn't highlighted correctly.

2. To Reproduce Steps to reproduce the behavior:

  1. create an enum with with the values in a one line syntax.

image

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior Everything that compiles should be highlighted correctly.

4. Actual behavior No Highliting.

5. Versions:

Internal work item: AB#540890

thpeder commented 4 months ago

Hi @pri-kise, I just tried to reproduce the issue, but this is what I see. image

and you can also see that locked is not allowed, so I suspect the editor service crashed. Can you reproduce it?

NKarolak commented 4 months ago

@thpeder This is about the extension for DevOps, not for/in VS Code.

Locked is supported, but you need to replace the preceding semicolon with a comma - compare with pri-kise's code ;-)

thpeder commented 4 months ago

Thanks for the help! We will have a closer look at it.

EmilDamsbo commented 4 months ago

Interestingly, this does work when your curly braces are not on the same line as the value(x; someName) declaration: image

While we work on a fix to the issue, if this is bothering you, you could switch the enum value declaraton to one of the formats above which are working - dark mode aside, the highlighter works the same.