URDF file doesn't show syntax highlighting

I have a problem whereby vscode emulator doesn’t show syntax highlighting even though the file name has .urdf included in it. The unusual thing is that the urdf file “mira_simple.urdf” has syntax highlighting while the current file does not (as shown)

What is the reason for this discrepancy, and how do i solve it?

What I did was basically use the ‘xml’ syntax in the vscode emulator. You can change it by clicking here :

Hope that helps!

Also the first line that states the xml version has to be there always to tell the IDE automatically what syntaxt to use.

1 Like