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

[meta] Get syntax highlighting for Bikeshed files #903

Closed
Crissov opened this issue Jan 13, 2017 · 7 comments
Closed

[meta] Get syntax highlighting for Bikeshed files #903

Crissov opened this issue Jan 13, 2017 · 7 comments

Comments

@Crissov
Copy link
Contributor

Crissov commented Jan 13, 2017

I’m not sure whether you could override Github’s syntax highlighting locally for the whole repository, but it would help if .bs files were parsed as either HTML or Markdown files.

Eventually, it should be added to https://github.com/github/linguist but things like speced/bikeshed#214 would probably have to be fixed first. Alternatively, the file extension could be changed to include .md or .html.

@upsuper
Copy link
Member

upsuper commented Jan 15, 2017

Given that this repo is marked that 86.3% of the code is HTML, I suspect that GitHub's linguist has already recognized .bs files here as HTML. But highlight doesn't use the language from linguist. I guess that relies on some variant of pygments.

Linguist's README says you can use vim or emacs modelines to specify language for highlight of a given file, which is probably something we can actually do.

@upsuper
Copy link
Member

upsuper commented Jan 15, 2017

I suspect that GitHub's linguist has already recognized .bs files here as HTML.

Oh, hmm, no. Linguist actually think those files are plain text, so they are probably not counted as source files at all...

@fantasai
Copy link
Collaborator

File this against the bikeshed repo, please, as it's more of a bikeshed issue than a CSS spec issue? Thanks~

@tabatkins
Copy link
Member

I have no idea what I'd do for it in Bikeshed, either. I guess try and bug GitHub to add support for Bikeshed files? But I don't have a good, official syntax highlighter for them yet anyway, and GitHub doesn't have an official issues list anyway.

@upsuper
Copy link
Member

upsuper commented Mar 30, 2017

GitHub's Linguist repo is probably where the issue should go https://github.com/github/linguist

@Crissov
Copy link
Contributor Author

Crissov commented Mar 30, 2017

Meanwhile, github-linguist/linguist#1792 has been closed and a .gitattributes override should work, e.g. treating Bikeshed as Markdown (which includes HTML):

$ cat .gitattributes
*.bs linguist-language=Markdown

@tabatkins
Copy link
Member

I've added a .gitattributes setting the highlighting language to HTML. I tried Markdown first, but it misfired a good bit, and didn't highlight most of the markup.

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

4 participants