The Unity Features page of the Rider website advertises standard IDE features for .shader files. While these work for the ShaderLab header and footer, I'm not able to get any syntax highlighting, code completion, bracket folding, syntax checking, etc. to work for the CGPROGRAM block, aside from some extremely minimal syntax highlighting on keywords and comments.
(shown here using the Rider Dark theme, on a snippet of code from the Custom Shader Fundamentals page from the Unity Manual)
It just doesn't seem to recognize which parts are actually in the CGPROGRAM block, and therefore need to be highlighted differently. Any idea what I can do here to make highlighting, completion, etc, work properly here?
I've tried moving the HLSL to a separate file, and syntax highlighting still doesn't work. There also doesn't seem to be an entry in the filetypes list for HLSL either -- I'm not sure if that's intended behavior or not, but it seems like it could be part of the problem?