问题
For my Open GL shaders, GitHub seems to recognize fragment shader ( extension .fs
) but not vertex shaders ( extension .vs
)
Since GLSL has no defined extensions (it loads text) what is a good extension to use so I get my code recognized.
As an example my shaders Example Shaders
Note how .fs
looks pretty and .vs
like plain text
回答1:
See if a .gitattributes
linguistic directive, as I mentioned in "Github changes repository to wrong language", would be enough:
*.vs linguist-detectable
*.vs linguist-language=GLSL
lib/linguist/languages.yml GLSL section does include ".fs
", but no ".vs
", only ".vsh
"
来源:https://stackoverflow.com/questions/60219315/what-extensions-does-github-support-for-syntax-highlighting-and-for-code-langua