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

Add .gitattributes to syntax highlight bst files as yaml #1841

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cs-shadow
Copy link
Member

Add a .gitattributes file to suggest GitHub Linguist to treat .bst files and project.conf file anywhere in the project as YAML for the purposes of syntax highlighting.

If we agree with this change, we can also add something in our documentation to suggest users to add something similar to their projects. Although that suggestion will depend on the Git hosting service used. GitHub and GitLab both support overrides via .gitattributes file but use different keywords. See:

Add a `.gitattributes` file to suggest GitHub Linguist to treat
`.bst` files and `project.conf` file anywhere in the project as
YAML for the purposes of syntax highlighting.

If we agree with this change, we can also add something in our
documentation to suggest users to add something similar to
their projects. Although that suggestion will depend on the Git
hosting service used. GitHub and GitLab both support overrides
via `.gitattributes` file but use different keywords. See:

* https://github.com/github-linguist/linguist/blob/master/docs/overrides.md#using-gitattributes
* https://docs.gitlab.com/ee/user/project/highlighting.html#override-syntax-highlighting-for-a-file-type
@cs-shadow
Copy link
Member Author

You can see the difference in the highlighting here: old vs new

it's not a huge difference but i think it makes looking at these files slightly nicer.

@cs-shadow cs-shadow marked this pull request as draft May 11, 2023 22:21
@cs-shadow
Copy link
Member Author

Draft for now - that doesn't seem to be working as expected, will investigate more.

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.

1 participant