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(languages): git-ignore and git-attributes #2397

Merged
merged 3 commits into from
May 5, 2022
Merged

feat(languages): git-ignore and git-attributes #2397

merged 3 commits into from
May 5, 2022

Conversation

mtoohey31
Copy link
Contributor

This PR adds support for .gitignore and .gitattributes files. I was a little unsure of where to include dashes in the name/scope/injection regex, but I tried to be consistent with the other git-* filetypes. There's no indent values specified since these filetypes don't have indentation. I had to make one change to the core code to allow for hyphens in ; inherits: ... comments, hope that's ok. Finally, using non-hyphenated grammar names seemed to be necessary, otherwise the grammars just don't work, but I'm not sure why...

@the-mikedavis the-mikedavis self-requested a review May 4, 2022 16:43
@the-mikedavis
Copy link
Member

Sweet! Would you mind adding a license to tree-sitter-gitattributes? I think technically we're not supposed to distribute grammar repositories without a license that says we can. I also opened up shunsambongi/tree-sitter-gitignore#1 for the gitignore grammar.

And yep, that regex change for the inherits looks good 👍

@the-mikedavis
Copy link
Member

the-mikedavis commented May 5, 2022

Looks like tree-sitter-gitignore has a license now 🎉. If you update the revision for that grammar I think this should be good to merge.

@mtoohey31
Copy link
Contributor Author

Looks like tree-sitter-gitignore has a license now tada. If you update the revision for that grammar I think this should be good to merge.

Great, 5fee71f includes the versions of both grammars with licenses!

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thanks for working on these!

@the-mikedavis the-mikedavis merged commit a5f4925 into helix-editor:master May 5, 2022
@mtoohey31 mtoohey31 deleted the feat/git-ignore-and-attributes branch May 5, 2022 13:51
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.

2 participants