minism / SublimeLove

LÖVE support for SublimeText2
http://love2d.org
41 stars 16 forks source link

Love GLSL #8

Open DanielOaks opened 9 years ago

DanielOaks commented 9 years ago

It'd be awesome if there was a Love GLSL highlighter, for Love graphics shaders.

cybojanek commented 9 years ago

It already sort of exists: https://github.com/minism/SublimeLove/blob/master/Love.JSON-tmLanguage#L135

I added it, and it'll select GLSL when you create a new pixel effect. It actually selects "C", instead of real GLSL (which is available via a plugin), and I think the colors inside the multi-line string were a bit different for some reason.

Either way, I think this is the way to go with it.

DanielOaks commented 9 years ago

Fair enough. If that's the way it's gonna be implemented I'll probably create a new SublimeLoveGLSL package for the GLSL syntax highlighting I've got in PR #10, just because my shaders usually exist as a separate file rather than inside a newPixelEffect call.

Edit: Just updated my PR, made that call support newShader and newPixelEffect, and highlight with proper LoveGLSL shading inside that call too.