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

feat: first-line-regex to detect languages #7853

Closed
wants to merge 13 commits into from

Conversation

sigmaSd
Copy link
Contributor

@sigmaSd sigmaSd commented Aug 7, 2023

Add a new method to detect a language: first-line-regex

This is taken from tree sitter https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-detection (there is also content-regex)

Vim also have something similar

This is useful for files that usually don't have an extension but have a known layout: strace output, tree sitter tests, etc..

@pascalkuthe
Copy link
Member

clsoing this one out as stale. This kind of thing is fairly niche and has an easy workaround (:language). I think this can be added as a plugin in the future. Thank you for contributing!

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

Successfully merging this pull request may close these issues.

3 participants