Author Topic: LUA Language plugin for Visual Studio 2012  (Read 18337 times)

0 Members and 1 Guest are viewing this topic.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
LUA Language plugin for Visual Studio 2012
« 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 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.
« Last Edit: January 31, 2013 by Raizor »
raizor

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1200
  • Karma: 230
    • View Profile
    • Homepage
Re: LUA Language plugin for Visual Studio 2012
« Reply #1 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! :)
www.kirl.nl
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #2 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?
raizor

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1200
  • Karma: 230
    • View Profile
    • Homepage
Re: LUA Language plugin for Visual Studio 2012
« Reply #3 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! :)
www.kirl.nl
Challenge Trophies Won:

Offline EpikYummeh

  • .NET Nub
  • ZX 81
  • *
  • Posts: 9
  • Karma: 1
  • C# erry day
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #4 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!
C# - JavaScript - XHTML/CSS - RBX.Lua

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #5 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 :)
raizor

Challenge Trophies Won:

Offline EpikYummeh

  • .NET Nub
  • ZX 81
  • *
  • Posts: 9
  • Karma: 1
  • C# erry day
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #6 on: November 30, 2012 »
Have you heard of SublimeText? 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.
C# - JavaScript - XHTML/CSS - RBX.Lua

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #7 on: December 02, 2012 »
Have you heard of SublimeText? 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 :)
raizor

Challenge Trophies Won:

Offline EpikYummeh

  • .NET Nub
  • ZX 81
  • *
  • Posts: 9
  • Karma: 1
  • C# erry day
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #8 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.
C# - JavaScript - XHTML/CSS - RBX.Lua

Offline zid

  • ZX 81
  • *
  • Posts: 1
  • Karma: 1
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #9 on: December 22, 2012 »
thanks for the port - works like a charm.

Offline kennethm

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #10 on: December 31, 2012 »
Thanks very much for the port.  It worked well for me.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #11 on: December 31, 2012 »
kennethm, zid, I'm glad it was useful for you :)
raizor

Challenge Trophies Won:

Offline serializer

  • ZX 81
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #12 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 :)


Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #13 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 :)
raizor

Challenge Trophies Won:

Offline denghe

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #14 on: January 26, 2013 »
good job !!! thank you very much !!!  :updance:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #15 on: January 26, 2013 »
You're welcome denghe :)
raizor

Challenge Trophies Won:

Offline dcga

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #16 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?

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: LUA Language plugin for Visual Studio 2012
« Reply #17 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.
raizor

Challenge Trophies Won:

Offline malchezor

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #18 on: February 19, 2013 »
Thank you very much its really useful!

Offline RiC0MD

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: LUA Language plugin for Visual Studio 2012
« Reply #19 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.