What extensions does github support, for syntax highlighting and for code/language recognition?

瘦欲@ 提交于 2020-02-22 07:48:06

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!