AL icon indicating copy to clipboard operation
AL copied to clipboard

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

Open pri-kise opened this issue 1 year ago • 4 comments

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:

  • AL Language Syntax Highlights for Microsoft Dynamics 365 Business Central: 12.7.944946 (Latest)

Internal work item: AB#540890

pri-kise avatar Jul 05 '24 08:07 pri-kise

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?

thpeder avatar Jul 10 '24 11:07 thpeder

@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 ;-)

NKarolak avatar Jul 10 '24 11:07 NKarolak

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

thpeder avatar Jul 10 '24 12:07 thpeder

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.

EmilDamsbo avatar Jul 23 '24 11:07 EmilDamsbo