parro-it / gravity-func

functional utility for gravity
MIT License
7 stars 1 forks source link

Create a .gitattributes file #3

Open marcobambini opened 7 years ago

marcobambini commented 7 years ago

You should add a .gitattributes file with the following content: *.gravity linguist-language=swift

In this way you'll have syntax highlight for the Gravity files.

parro-it commented 7 years ago

I already have them by using sublime text, but I'll happy to add the file if it can help others, thank you!

parro-it commented 7 years ago

Oh did you mean in GH pages?

marcobambini commented 7 years ago

Yep!

parro-it commented 7 years ago

Seems to work in test files, but not in main one. Maybe there is some syntax there not allowed by swift lang?

marcobambini commented 7 years ago

I am currently using it in my main Gravity repository and everything worked as expected...

parro-it commented 7 years ago

If you look at: https://github.com/parro-it/gravity-func/blob/master/gravity-func.gravity it's sadly black & white. But e.g. https://github.com/parro-it/gravity-func/blob/master/test/pipe.gravity has now good syntax highlights... I don't have idea why...

marcobambini commented 7 years ago

I guess it is the - character in the name that caused the issue...

parro-it commented 7 years ago

Uhm, no, I try to rename pipe.gravity to pi-pe.gravity and it still is highlighted

parro-it commented 7 years ago

Also, if you look at http://pygments.org/demo/6353109/, the same code is highlighted correctly as swiftr, so it can't be a syntax problem either...