Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Raizor on October 26, 2012

Title: LUA Language plugin for Visual Studio 2012
Post by: Raizor on October 26, 2012
I've been doing some LUA work recently and have also upgraded to Visual Studio 2012. Unfortunately, there's no LUA plugin for VS 2012 to support syntax highlighting etc. I decided to have a go at porting VSLua (http://vslua.codeplex.com/) over to VS 2012 and it's worked well.

I've attached the extension to this post in case anyone else would find it useful.

Cheers,

Raizor

EDIT: I've also attached the source to this post too.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Kirl on October 26, 2012
Hey how did you come upon Lua? :)
I played around with it a bit on Codea on the ipad and really quite like it.

K++ of course! :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on October 26, 2012
Hey how did you come upon Lua? :)
I played around with it a bit on Codea on the ipad and really quite like it.

K++ of course! :)

It's used in Fnuque's 64k intro tool for a lot of the GUI stuff. It saves time and hassle by avoiding having to recompile the C++ code each time changes are made. That's the theory anyway :)

It's certainly taking some getting used to as it's quite different from any language I've used before. The whole .. string concatenation and -- comments keep catching me out. I was having a hard time without a syntax highlighter, so that's why I decided to have a go at porting it. It doesn't populate the navigator bar in Visual Studio, which when using C#, C++ etc lists all the functions/methods/objects in the current class and makes it really easy to navigate code. Not the end of the world, but I still miss that when using Lua. Lua is starting to grow on me though, albeit it slowly, like a fungus :)

I still haven't got around to playing with Codea, it sounds like you guys are having some good fun with it, so it would be good to check it out at some point. Is it possible to export/import/share code with it?
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Kirl on October 26, 2012
I still haven't got around to playing with Codea, it sounds like you guys are having some good fun with it, so it would be good to check it out at some point. Is it possible to export/import/share code with it?
You need to copy-paste code manually, there is a link to codea's forums in the main menu, but that's it. The project sharing feature was pulled on Apple's request, because the the free sharing of programs might just undermine the app store. 
Apple... :diablo: 

Would be cool if you joined in! :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: EpikYummeh on November 29, 2012
Thank you very much! This works great; if only it was easier to create IntelliSense support for such a loosely typed language.

I had seen the 2010 version plugin and was hopeful it would work, but here I am! Great work!
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on November 29, 2012
Thank you very much! This works great; if only it was easier to create IntelliSense support for such a loosely typed language.

I had seen the 2010 version plugin and was hopeful it would work, but here I am! Great work!

No worries EpikYummeh, glad it's proved useful. I did give intellisense some thought, but as you mention, it's a bit of a can of worms with a loosely typed language and not exactly quick to implement. The syntax highlighting is proving enough for me - for now ;)

Thank you for the feedback, and welcome to DBF :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: EpikYummeh on November 30, 2012
Have you heard of SublimeText (http://www.sublimetext.com/)? They actually have a primitive version of IntelliSense with variable name completion that works for Lua.

The only way I could see getting that to work is adding every identifier or block of text that is not in the list of language clauses and control structure keywords and not a string, but then you have to take into account lexical scope and it could get a bit messy from there. I haven't poked around with how IntelliSense works, but it may be easier than I'm thinking.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on December 02, 2012
Have you heard of SublimeText (http://www.sublimetext.com/)? They actually have a primitive version of IntelliSense with variable name completion that works for Lua.

The only way I could see getting that to work is adding every identifier or block of text that is not in the list of language clauses and control structure keywords and not a string, but then you have to take into account lexical scope and it could get a bit messy from there. I haven't poked around with how IntelliSense works, but it may be easier than I'm thinking.

No, I've not come across that before. It does look quite interesting. I really would like a solution that slots into Visual Studio though, and that doesn't look like it does. Worth a go though, thanks for pointing it out :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: EpikYummeh on December 04, 2012
Yeah, it has its ups and downs. I've only found it useful for Lua, but I definitely prefer Visual Studio to any other editor I've used, though.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: zid on December 22, 2012
thanks for the port - works like a charm.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: kennethm on December 31, 2012
Thanks very much for the port.  It worked well for me.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on December 31, 2012
kennethm, zid, I'm glad it was useful for you :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: serializer on January 18, 2013
Thanks also, I registered to download this as there doesn't seem to be anything else around for VS2012. Doing some work on an open source game trying to knock some sense into an 8000-line Lua script which was starting to hurt without colour coding :)

Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on January 18, 2013
Thanks also, I registered to download this as there doesn't seem to be anything else around for VS2012. Doing some work on an open source game trying to knock some sense into an 8000-line Lua script which was starting to hurt without colour coding :)

You're most welcome Serializer :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: denghe on January 26, 2013
good job !!! thank you very much !!!  :updance:
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on January 26, 2013
You're welcome denghe :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: dcga on January 31, 2013
Thank you so much for this!
Have you considered sharing the source code in case someone wants to add more features to the language service?
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on January 31, 2013
Thank you so much for this!
Have you considered sharing the source code in case someone wants to add more features to the language service?

No worries dcga :) I've attached the source to the first post in this thread in case anyone wants it.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: malchezor on February 19, 2013
Thank you very much its really useful!
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: RiC0MD on February 20, 2013
Thx very much for this, was looking for something to base a quick personal project on, and this fits the bill.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Shockwave on March 02, 2013
According to the stats, this topic is the number one reason people find us these days!
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Kirl on March 02, 2013
k+ Raizor dude!  :cheers:
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: codeservant on March 14, 2013
I've been doing some LUA work recently and have also upgraded to Visual Studio 2012. Unfortunately, there's no LUA plugin for VS 2012 to support syntax highlighting etc. I decided to have a go at porting VSLua (http://vslua.codeplex.com/) over to VS 2012 and it's worked well.

I've attached the extension to this post in case anyone else would find it useful.

Cheers,

Raizor

EDIT: I've also attached the source to this post too.

Thanks Raizor, I was looking for this  :clap:

I don't know I f I can keep up posting everyday hahaha, I'll try. Anyway nice to meet you guys all :updance:
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: codeservant on March 18, 2013
Hi Guys,

I curios is it can't be installed into VS 2012 Express Edition?

Thanks
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on March 18, 2013
Hi Guys,

I curios is it can't be installed into VS 2012 Express Edition?

Thanks

I don't think the Express edition supports installing extensions. I might be mistaken though. Please let us know if you give it a try :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Bishop on March 19, 2013
Thank you for this plugin! I prefer to stay within Visual Studio and not have to download a separate editor. This is helpful.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: codeservant on March 20, 2013
Hi Guys,

I curios is it can't be installed into VS 2012 Express Edition?

Thanks

I don't think the Express edition supports installing extensions. I might be mistaken though. Please let us know if you give it a try :)

Indeed, Express edition can't detected when I'm trying install this plugin :D
Well so I just need to extend my trial license in Ultimate  :stirrer:
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on March 20, 2013
Just to be clear, I didn't write the LUA plugin, I just made it compatible with Visual Studio 2012. The original plugin came from here (http://vslua.codeplex.com/). Doesn't look like they've updated for 2012 yet though :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: 50504724 on March 27, 2013
thx for the plugin. It works well but sometimes shows error message box.

Does it support intellisense so far >.< though I've not find an IDE supports it perfectly
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on March 27, 2013
thx for the plugin. It works well but sometimes shows error message box.

Does it support intellisense so far >.< though I've not find an IDE supports it perfectly

I've never seen the error messagebox myself. Intellisense is tricky due to a number of factors, especially LUA being loosely typed. I might have a look at adding this at some point, but it's a really tedious job, so there are plenty or more exciting things to focus on atm :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: ffoliveira on April 05, 2013
:) Unfortunately the plugin wont run on Visual Studio 2012 Express
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: svcondor on May 04, 2013
Many thanks, don't know lua yet but this should help a lot.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: lliihhaaoo on May 08, 2013
Many thanks! I really need the Vs2012 lua.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: zazu on May 12, 2013
Thanks a ton! This will definitely come in handy.

And yeah, found this site only because of this topic. :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Hotshot on May 12, 2013
Quite lots of One post wonder here, nicking LUA Files on here ::) and never post again as that not good at all!  :(

I would like to see LUA Forum on DBF where people show their work on what they have done as that may help :)

or

if any person post 10 or more then they have the LUA Files which I think seem fair......

It is up to Shockwave on what he think about that as I guess he doesnt want too many One post wonder by end of year as if person havnt post more than 1 year thefore they should have warning when they received their email and if they haven't bother to respond then their account should be delete!

what do you think guys?
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on May 12, 2013
Quite lots of One post wonder here, nicking LUA Files on here ::) and never post again as that not good at all!  :(

I would like to see LUA Forum on DBF where people show their work on what they have done as that may help :)

or

if any person post 10 or more then they have the LUA Files which I think seem fair......

It is up to Shockwave on what he think about that as I guess he doesnt want too many One post wonder by end of year as if person havnt post more than 1 year thefore they should have warning when they received their email and if they haven't bother to respond then their account should be delete!

what do you think guys?

Haha, what do I think? I think you need to calm down a bit Hotshot ;)

They have to register in order to download attachments. I don't see any of this being a big issue, at least not for me. I uploaded the plugin conversion here as I figured it may drive some traffic to DBF and a small number of the people who registered to download it may end up sticking around. Seeing posts like yours is unlikely to encourage people to want to stay and contribute. That's my two cents anyway :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: zazu on May 12, 2013
... a small number of the people who registered to download it may end up sticking around. Seeing posts like yours is unlikely to encourage people to want to stay and contribute.
:goodpost:

I won't lie, I registered because I had to. It would have been nice not to have to register to yet another forum, but it's all good. I've been browsing a little bit, and I may at the very least become a lurker, reading up on stuff and making the occasional post. I'm not a full fledged developer - I just code to create quick solutions or utilities when there's a need.

Anyway, I hope Hotshot's sentiment isn't shared among the majority here.  I understand it, but don't agree with it . . . but hey, I'm just the FNG.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: iomk on May 13, 2013
 Downloading now, gonna try it later... Nice share.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: BlazesRus on July 10, 2013
You thinking of porting this to Visual Studio 2013?
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: pasman on July 18, 2013
Awesome work!
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on July 23, 2013
I've found another LUA plugin for VS that seems a lot better than this one (has some intellisense support for a start). I can't recall the name and don't have the files here at work, but I'll upload it tonight. I've managed to get it working in VS 2012, but not 2013 yet (as I don't have it installed, and probably won't until it's released).
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on July 23, 2013
NPLanguage (http://visualstudiogallery.msdn.microsoft.com/7782dc20-924a-4726-8656-d876cdbb3417) is what I've been using lately. I prefer it.

If you want to get it to install for VS2012, rename the .vsix to .zip, open the manifest and change the VS version number from 10 to 11. Rename back to .vsix, and install :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: mnem on August 22, 2013
Thanks for the zips and the link to the alternative one :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on August 22, 2013
No worries mnem :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: CLRPizzas on September 13, 2013
Amazing job Raizor.

The last few days I have trying to port vslua dot codeplex to vs 2012 but unsuccessful try,  my compiles always give-my errors!

Your good work save-my some weeks or months.
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: Raizor on September 13, 2013
Glad it's helped CLRPizzas :)
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: curvycom on October 11, 2013
I've been doing some LUA work recently and have also upgraded to Visual Studio 2012. Unfortunately, there's no LUA plugin for VS 2012 to support syntax highlighting etc. I decided to have a go at porting VSLua (http://vslua.codeplex.com/) over to VS 2012 and it's worked well.

I've attached the extension to this post in case anyone else would find it useful.

Cheers,

Raizor

EDIT: I've also attached the source to this post too.

Thanks dude!  I'll have a look!
Title: Re: LUA Language plugin for Visual Studio 2012
Post by: mxms on October 17, 2014
Thanks, I realize its been a while, but I signed up to get this.
I have the "Lua Language" extension loaded and enabled in Visual Studio 2012.
When using the Dark theme, I see no improvement in syntax highlighting - the Lua text is unreadable in this theme.

Does Visual Studio 2012 in the Dark Theme with this plugin work properly for others?

Thanks.