Vertex, fragment and geometry shader programs can be written in GLSL. These are usually written in separate files. Any filename and extension can be used for GLSL shader files since the language standard does not enforce anything.
I found it convenient to name the shader programs as
foo.gs.glsl. I found this convention used in the source code from the book The OpenGL Superbible. The
.glsl is recognized by many editors and GLSL syntax highlighting is automatically applied when you open those files.