Visual Studio Lua Plugin!

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
Matrixmage
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jun 29, 2015 9:32 pm
Contact:

Visual Studio Lua Plugin!

Post by Matrixmage »

Hello!

So I've found a Lua plugin for VS that adds intellisense, debugging, file management, syntax highlighting, and a few other random things here and there. By default the plugin was made to only work for the Pro and Premium versions of VS, but because the project is open source and under the MIT license I did a quick hack so that it can work with all the versions, and now I'm sharing it here for you all to use!

The plugin is called BabeLua and unfortunately doesn't have the greatest quick start guide, so I'm going do a little crash course here on how to set it up.
Quick Start Guide
Quick guide for people who know what they're doing
Super Quick Knowledgeable Guide
Extra/Repeat of information:

Original BabeLua site: http://babelua.codeplex.com/
My modified BabeLua plugin: http://www.mediafire.com/download/71eg3 ... rsion.vsix
Visual Studio Community 2013 page: https://www.visualstudio.com/en-us/prod ... ty-vs.aspx
Lua binaries: https://code.google.com/p/luaforwindows ... e&can=2&q=


Hope this works for everyone and that it augments their modding experience!


Note: Both my modified version and the original are licensed under the MIT license which is included with both downloads and is licensed by each respective author.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by keyboardhack »

Nice work with this. I think i will be using this from now on as my modding enviroment.

Will add one thing i noticed when setting up the plugin.
The name of your .lua file has to be in the "Command line" field. so if my lua file is "Derp.lua" then that has to be in the command line awell.
You can at any tine change the field in Projects -> Properties
Waste of bytes : P

User avatar
semvoz
Inserter
Inserter
Posts: 30
Joined: Wed Jun 17, 2015 12:03 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by semvoz »

There's a free Lua plugin which is not bad at all that you get for free (without any hack) when you get IntelliJ community, that's what I am using, it's working pretty well, it offers all the common feature you have with IntelliJ (which is a long long list that I won't provide here :)) the plugin is here but directly obtainable from your IntellIJ instance (options/plugins).

tjmonk15
Inserter
Inserter
Posts: 26
Joined: Fri Jun 20, 2014 9:23 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by tjmonk15 »

I found this plugin as well the other day, but I could not get debugging to work within factorio. Were you able to actually debug a mod with this plugin?

- Monk

johanwanderer
Fast Inserter
Fast Inserter
Posts: 157
Joined: Fri Jun 26, 2015 11:13 pm

Re: Visual Studio Lua Plugin!

Post by johanwanderer »

For those of us who are a bit more... old school :)

Lua plugin for Visual Studio 2005:
http://luaforge.net/projects/lualangpack/

microsoftdotcom
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Aug 07, 2015 8:53 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by microsoftdotcom »

I tried the babelua plugin and it works, but when debugging inside of Visual Studio, the lua.exe command window pops up and closes immediately if the code is correct.
I tried making a testfile.lua with a print("hello") statement and it is still doing this.

How can I fix this guys? I want it to stop closing the lua command window so I can actually see the output that is printed out. Pls help
Thanks in advance

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by keyboardhack »

microsoftdotcom wrote:I tried the babelua plugin and it works, but when debugging inside of Visual Studio, the lua.exe command window pops up and closes immediately if the code is correct.
I tried making a testfile.lua with a print("hello") statement and it is still doing this.

How can I fix this guys? I want it to stop closing the lua command window so I can actually see the output that is printed out. Pls help
Thanks in advance
Place

Code: Select all

io.read()
at the end of the code.
that will wait for user input before closing the window.
Waste of bytes : P

slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: Visual Studio Lua Plugin!

Post by slindenau »

tjmonk15 wrote:I found this plugin as well the other day, but I could not get debugging to work within factorio. Were you able to actually debug a mod with this plugin?

- Monk
I'm experimenting with this IntelliJ plugin, and would like to setup debugging. How are you debugging mods within Factorio from Visual Studio?
Do you also have the Factorio API loaded in VS so you get autocomplete & documentation inside VS?
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545

Post Reply

Return to “Modding discussion”