Syntax highlighting only works for some kotlin files but not others


Syntax highlighting is working for only some Kotlin files.

For other kotlin files it shows ‘OFF’ in the top right corner.

There doesnt seem to be any way to enable it.

I think this might be specific to different directories as all files in certain directories do not show highlighting and similarly all files in some directories show highlighting.

Attached an image of what is shown in the top right corner of files without highlighting


Do you have this directory configured as the sources root in the project?

Share a sample project to reproduce if you still can't solve it: