GLSL: Support Brace Matching and Identing (Syntax Highlighting)
As it stands, working with glsl .vert and .frag files inside the sdk is a nightmare. There's no syntax highlighting (let alone code completion) and indents are a mess. Every time you press enter your new line will start with 0 indents. Not having auto completion for brackets and curly braces is annoying too. A lot of those problems (but not all of them) can be fixed by installing some third party netbeans plugin, but shaders are a very important thing and I think we should be supporting them by default.
There is a glsl plugin for netbens afaik http://plugins.netbeans.org/plugin/46515/glsl-syntax-highlighter I used it when I was using the sdk and it works fine.
Yeah I am using that too. However my point is that this is one of the things we should be supporting out of the box (the other being gradle build), but we don't. The plugin doesn't provide a fix for indents or brace autocompletion issue. It just adds syntax highlighting, which makes work easier, but the other problems are still very annoying.
The Problem here is that:
- I don't know certainly how to add/remove modules from the SDK (I've not found a way to remove nifty without just deleting it).
- We can't just distribute that plugin, since it's licensed as GPLv3. We would need to write a similar plugin. I know that's a bummer but can't change it there.
A custom plugin would be nice though, since it can also autocomplete jme-isms (all the uniform names). So let's take this issue as the starting point:
Everyone is free to give this a try.
I've looked into GLSL Plugins early (1-2 years ago), there is good documentation about custom syntax highlighting. Darkmonkey actually already provides color schemes for that, one just needs the lexer part. I think this should be in a separate repo though, you can also test this with stock netbeans probably.
No real point in making this separate from sdk IMO since everyone else can use the existing plugin.
Work started here: https://github.com/grizeldi/sdk/tree/glsl Note though that this is my first time working with netbeans, so I'm learning as I go.
@grizeldi Is there anything missing actually?
It's been a while, but iirc syntax highlighting should work. Indents and braces are still a pain though.
Okay, then I'll only rename/rephase this issue, to clearly point out that we could enhance the existing module with brace matching, idents and stuff :)