linguist
linguist copied to clipboard
Include support for JSP tag files
Hi,
I would like to suggest support for files with the extension ".tag". They have the same syntax used by JSP language, but it is not displayed with the same syntax highlighting:
:pray:
If we add the .tag
file extension to JSP, we also need to add it to every other language that use it (otherwise all .tag
files will be indentified as JSP). Thus, we first need to identify languages that use the .jsp
file extension.
@reebr Are those files JSP tag files?
So far, I found:
Woah, there're several languages that use this file format, I didn't know that. Thanks for the search @pchaigno.
I'm not sure about these files, but it seems they use the Play framework template tags. But those files, they are definitely not related to Java / JSP.
Maybe it's a bad idea implement this for a specific language, there are a lot of ".tag" types.
I'm not sure about these files, but it seems they use the Play framework template tags.
So... they are JSP files too?
Maybe it's a bad idea implement this for a specific language, there are a lot of ".tag" types. :disappointed:
I think we're fine so far. It's more of an issue when there are many different data files (because we don't have a good way to detect them).
So... they are JSP files too?
I don't think so. To be honest, I didn't even know about this framework until you answered me, I researched about it after that. I believe it's more related to Java and Scala, although JSP is a Java technology those files look different.
It would be nice to have them recognized and syntax highlighted, but apparently It's hard to define where the file will be used, can be a java application, scala or even C ++ (as in the repositories you showed).
I counted 366 repositories by 315 different users from this small search for Play framework template files. It should be enough to add this language/framework too. We'll have to make sure on the exact name though. I'll ask around.
Any reason for the 4 years of nothing in this issue?
Anyway, searching 'extension:tag' gives a few other languages, such as CSV, XML, whatever this is, txt.
Is it fine to add .tag
as "JSP tag" even though there will be these false positives? What is usual practice when theres a bunch of weird files attached to slightly-generic filenames?
@Nixinova since this is was opened we've implemented the ability to add generic extensions to the https://github.com/github/linguist/blob/master/lib/linguist/generic.yml file with a corresponding heuristic for each language.