Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: leverage pygments' internal file type detection #1682

Closed
hoelzro opened this issue Nov 7, 2014 · 4 comments
Closed

Feature request: leverage pygments' internal file type detection #1682

hoelzro opened this issue Nov 7, 2014 · 4 comments

Comments

@hoelzro
Copy link
Contributor

hoelzro commented Nov 7, 2014

Linguist's language detection is pretty good, but some languages (ex. Perl 5 vs Perl 6) have special logic built into pygments itself to detect which language a blob of code is. Would it be possible to enter this value as a weight of some sort when determining the correct lexer to use?

@pchaigno
Copy link
Contributor

pchaigno commented Nov 7, 2014

Would it be possible to enter this value as a weight of some sort when determining the correct lexer to use?

I'm not sure I understand. Which value are you referring to?

@bkeepers
Copy link
Contributor

bkeepers commented Nov 7, 2014

@hoelzro thanks for the suggestion! A few months ago we definitely would have been interested in this, however…

We are actually moving away from pygments and using TextMate/SublimeText/Atom syntax bundles instead. We will likely be posting more about it soon, but for now that means we want to avoid any tighter coupling with pygments.

@bkeepers bkeepers closed this as completed Nov 7, 2014
@hoelzro
Copy link
Contributor Author

hoelzro commented Nov 7, 2014

@pchaigno To satisfy any curiosity you may have, pygments returns a certainty value between 0 and 1 indicating how certain it is that a blob is of a particular language.

@hoelzro
Copy link
Contributor Author

hoelzro commented Nov 7, 2014

@bkeepers Thanks for the response; good to know! Now I just have to port my lexer over to that =/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants