gLua syntax highlighting plugin - Updated (17/12/09)

This probably wouldn’t have gotten enough attention as a single post, so I decided to make a new thread instead.

Long story short, I just updated the old plugin with newer functions, and some old missing ones. I added every function from the newest update, and some missing gamemode functions.

Fretta Download: <-- This is basically everything + the fretta hooks, untested though (could care less about fretta)

Install: Unzip the .rar file in Notepad++/plugins

I will update this thing as much as I can, and if you have any requests for functions that are included in Garry’s Mod, but not in the plugin, post them in this thread. Full credits still go to Garthex.

I absolutely suck at release threads.

Update: 19/12/09

Now should contain ALL of the functions that gLua offers, including the newest enumerations, global functions and whatnot.


I was wondering, will you add derma functions as well? Or is that just stupid to do?

Maybe next time. I’m thinking about adding VGUI functions, but it would require everyone to use a single table name (PANEL)

Can’t you automate adding all global and library functions?

I tried outputting all functions in the global table to a usable file, but srcds didn’t really like that.

I did a bunch of functions that way (Place them in a file -> Set file to use gLua syntax -> Add non highlighted functions -> Repeat)


Direct Download Mirror:
Nice release, thanks.

Probably wasn’t clear enough on install notes:

You need to install the full plugin ( then overwrite the xml file. Also, I didn’t create it, Garthex did, I just modified it.

Tis very nice.

Hmm, it’s a bit slow for me.

I didn’t notice that, but I can’t get the source to the plugin so I wouldn’t know how to optimize it.


Oh wait, I can.

                                if (keywords0.InList(s)) {
                                } else if (keywords1.InList(s)) {
                                } else if (keywords2.InList(s)) {
                                } else if (keywords5.InList(s)) {
                                } else if (keywords8.InList(s)) {

Seems to be the way he does it. Now I’m not that proficient in C++, but I don’t think there’s any possibility of optimization there.

I started a greasemonkey script which adds gmod lua highlighting to [lua] tags.
Never bothered to finish it though.

I’ll probably get round to it one day.

I think you should add all of the Fretta stuff too, like team.SetClass and GM.RoundBased

Gmod Lua needs his own file extension so badly :stuck_out_tongue: (.glua - lol.)

I strongly disagree, considering it’s not a completely different language.

Ageed would be nice also add druma(? Spelling :l) and VGUI Please!

Derma :stuck_out_tongue:

I’ll work on an extended version later.

Thanks for this.

Turns out dear old Garthex had a Lua file that does this, but automatically. Going to do that later (already have the serverside functions, but srcds bitched about quite a few errors. Had to do some hacky shit, still need to mix it with clientside)


Updated again. Check OP.

Seems like none of the highlighting works now, only numbers strings and basic operators get highlighted. I looked at the xml file in config and everything is listed, I tried changing the style but nothing happened.