Chat freely about anything...

User avatar
By NullPointer
#61832 Hey Folks,

There is a VS extension for Lua, it's terrible. There is also a plugin for Visual Studio Code (.NET core) aimed at ESP8266 but it is somehow even worse. ESPlorer does a fair job of Lua syntax and upload to the chip, and while I donated some cash for my frequent use it is a bad development environment (sorry 4ref0nt).

Now, SDK developers are fine with VS but what about us pleb Lua application developers? Right now I have to open 15 Lua modules individually (that gets old fast, 4ref0nt). Apart from source control logs, I don't even know which files I need to upload to the ESP. Surely someone in this community is thinking about the advantages of the development environment in Visual Studio Code or Visual Studio, specifically for Lua and the ESP8266?

Anyone?
User avatar
By efess
#61851 I can't comment on how well VS Code works with Lua, but I've been using VS Code to develop for the ESP8266 with the NONOS SDK (plain C) and I love it. I also can write javascript and other languages seamlessly in the same environment without any issues. It even has amazing git integration.

I'm a longtime user of Visual Studio, and while I think VS is amazing, VS Code is extremely fast - it has just what you need to be productive while not being bogged down by a ton of features and options. There are plenty of extensions that adds "intellisense", code formatting, and static analysis to whatever language you want - I even see Lua as an option.

I have a build task setup so all I do is ctrl + b - and make is kicked off, flashing the esp.

I've only used the debugging support against nodejs apps, I see there *is* a gdb extension available, but haven't used it..
User avatar
By NullPointer
#61891 >I have a build task setup so all I do is ctrl + b - and make is kicked off, flashing the esp.

Can you share that build step? I can only assume you are pointing a flasher at your compiled ROM. I'm not the SDK stage yet but would love to have Visual Studio Code / Visual Studio take my Lua scripts and upload them to the NodeMCU. Any pointers on where to start with that?

Cheers.
User avatar
By efess
#61896 Here's a writeup on how tasks can be setup in VS Code:
https://code.visualstudio.com/Docs/editor/tasks

I have it pointing to make (using the TuanPM's MQTT makefile), although you can point it to any build script.

I really don't know much about lua or how it runs on the ESP, but does it rely on command line tools to send the scripts to the ESP? If so, just set up a script to execute them and you can target these by a task mentioned above