Why does Visual Studio Code not correctly render "isa" statement?

Hello!

In VS Code suppose I have the following snippet:

if isa(true,Bool)
    println("This is true")
end

if true isa Bool
    println("This is true too")
end

You even see how the code statement here actually renders it correctly, but in VS Code:
image

You see how “isa” is not coloured yellow in the second approach.

Kind regards

1 Like

I think this is quite consistent. Function calls are coloured yellow, but infix notation is not colored yellow (a in b vs in(a,b) does the same for example).

6 Likes

If you use my Julia Color Themes, then the second isa is colored the same as other infix operators:

image

There are various other Julia optimizations, like the end being colored a darker shade of red then the if and for keywords.

4 Likes

I wonder If someone made a custom theme where the end keyword is transparent, making julia code look like python :thinking:

I think that would not be a good idea. If you miss to type end, you would get errors, but not see that that is the cause of error.