github支持哪些扩展,用于语法突出显示和代码/语言识别? [英] What extensions does github support, for syntax highlighting and for code/language recognition?

查看:55
本文介绍了github支持哪些扩展,用于语法突出显示和代码/语言识别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的Open GL着色器,GitHub似乎可以识别片段着色器(扩展名为.fs),但不能识别顶点着色器(扩展名为.vs)

For my Open GL shaders, GitHub seems to recognize fragment shader ( extension .fs) but not vertex shaders ( extension .vs)

由于GLSL没有定义的扩展名(它会加载文本),因此最好使用一个扩展名,这样我就可以识别我的代码了.

Since GLSL has no defined extensions (it loads text) what is a good extension to use so I get my code recognized.

作为示例,我的着色器示例着色器
请注意.fs看起来很漂亮,而.vs看起来像纯文本

As an example my shaders Example Shaders
Note how .fs looks pretty and .vs like plain text

推荐答案

看看是否有.gitattributes语言指令,如我在" Github将存储库更改为错误的语言",就足够了:

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部分确实包含".fs",但不包含".vs",仅包含".vsh"

lib/linguist/languages.yml GLSL section does include ".fs", but no ".vs", only ".vsh"

这篇关于github支持哪些扩展,用于语法突出显示和代码/语言识别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆