Thank you so much to FernV for this. It is just what I was looking for and the old links from the LinuxCNC manual were dead.
Two comments though, from this extremely inexpert user.
The first is that in my version of UbuntuStudio 24.04 with Kde both the language-specs and the styles directories are in /usr/share/libgedit-gtksourceview-300/
The second is that after I put Gcode.xml into the styles directory, highlighting did not work until I renamed Gcode.xml to ngc.xml
Now it works great!
thanks, Jonathan