Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

VS Code
Started by horacebury Jan 22 2019 01:32 AM

- - - - -
18 replies to this topic
editors visual studio code lua
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,070 posts
  • Corona SDK

Does anyone use Visual Studio Code with Corona?

 

If so, how are you finding the experience?



[TOPIC: post.html]
#2

lacho.tomov

[GLOBAL: userInfoPane.html]
lacho.tomov
  • Observer

  • 19 posts
  • Corona SDK

I do, and I like it much more than Sublime.

 

However I had to give up on the debugger :) But I don't miss it too much, since I found debugging in Sublime pretty hard anyways, so I just print stuff to console.

 

And there's one super useful plugin I use - vscode-lua - it hints you on various errors around the code.



[TOPIC: post.html]
#3

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,070 posts
  • Corona SDK

I've never managed to use the debugger, which is a shame because I live by stop points in .NET.



[TOPIC: post.html]
#4

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

I use atom and so far it has been excellent!



[TOPIC: post.html]
#5

Appletreeman

[GLOBAL: userInfoPane.html]
Appletreeman
  • Contributor

  • 450 posts
  • Corona SDK

Another +1  for VS Code here.  I used Sublime for years but about this time last year I tried VS and haven't gone back. 



[TOPIC: post.html]
#6

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 982 posts
  • Corona SDK

Interesting... I'm a sublime user, but I have to admit, it's mostly the visual style that keeps me hooked. Still, I don't feel any strong extra requirements, except for that super-handy function/codeblock dropdown menu that textwrangler has.

 

What, in your opinions, are the biggest benefits to using Visual Studio?



[TOPIC: post.html]
#7

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

I think there is a major difference between the Atom plugin for autocomplete for corona and the one which is integrated with visual studio code. I found the autocomplete plugin in way Atom way better than VC. With Atom plugin a full suggestion list comes with the arguements and syntax, but not true for the VC corona plugin. Only shows the basic ones with no structure of arugements of inbuilt functions. Am I correct?



[TOPIC: post.html]
#8

lacho.tomov

[GLOBAL: userInfoPane.html]
lacho.tomov
  • Observer

  • 19 posts
  • Corona SDK

What, in your opinions, are the biggest benefits to using Visual Studio?

 

I like the debugger - i use it for various languages and it's pretty nice. Doesn't work with Corona though.

 

Plus the interface - Sublime's UI is nice when there's just the code screen.

But when you start adding other screens - file browser, find in files, debugging, ... pretty much anything - that's when I think it starts to get ugly. 



[TOPIC: post.html]
#9

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

With VS code what plugins do you guys use for corona? Do you use any additional one for autocompletion?



[TOPIC: post.html]
#10

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 982 posts
  • Corona SDK

It's cool to hear your opinions, because it really highlights how different people' coding style and environment seem to be! I seem to be of the the extremely 'lightweight' type here - as lacho.tomow hints, I only have the code screen open, 100% of the time.

 

Any extra windows open and I get confused! ^_^



[TOPIC: post.html]
#11

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,070 posts
  • Corona SDK

All really great input - I've just switched from TextWrangler which I've absolutely sworn by since 2011.

 

I'm getting more into VS Code because of the .NET use, but hoping it'll build out support, via plugins, for Lua, Corona etc.



[TOPIC: post.html]
#12

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

Can anyone give me a tutorial on VSCODE with corona, I do not like the autocompletion feature in the corona plugin. What plugins are being used to get the best out of VSCODE with corona? Please comment VSCode users.



[TOPIC: post.html]
#13

lacho.tomov

[GLOBAL: userInfoPane.html]
lacho.tomov
  • Observer

  • 19 posts
  • Corona SDK

I haven't been able to get corona autocomplete to work with vscode and I don't think it's possible currently.

I use only one plugin for Corona:

https://marketplace.visualstudio.com/items?itemName=trixnz.vscode-lua

 

It analyses the code as you type and hints you on certain errors - like forgetting to use "local", typos, unused variables and others. I like it a lot.

But it takes some configuration. You need to install the luacheck binary and set its path in the vscode config: open the vscode settings and search for luacheck - add the path there, then restart. It should now start pointing errors.

 

And I placed the following .luacheckrc file in the main folder, it ignores certain errors that I don't plan to fix and makes sure it doesn't complain that the corona libraries are undefined:

std = {
    read_globals = {
        "display", "transition", "timer", "require", "Runtime", "os", "io", "native", "print", "tonumber", "system", "math", "table", "pairs", "unpack", "tostring"
    }
}
ignore = {
    "611",  -- line has only whitespace
    "631",  -- line is too long
    "212",  -- unused argument
    "213"   -- unused loop variable
}


[TOPIC: post.html]
#14

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

Thanks! Atom with Corona plugin is pretty powerful and dont think VScode can be an alternative without full fledged alternative.



[TOPIC: post.html]
#15

IndieEnthusiast

[GLOBAL: userInfoPane.html]
IndieEnthusiast
  • Contributor

  • 227 posts
  • Corona SDK

I would have used Visual Studio Code, if it had a proper autocomplete feature for corona, so its kind of disappointing for me.



[TOPIC: post.html]
#16

tntwickey

[GLOBAL: userInfoPane.html]
tntwickey
  • Enthusiast

  • 74 posts
  • Corona SDK

I use ZeroBrane (https://studio.zerobrane.com/) as a debugger and vscode as my editor.

 

I would really like auto-complete/intellisense for Corona though.



[TOPIC: post.html]
#17

hmclark2014

[GLOBAL: userInfoPane.html]
hmclark2014
  • Observer

  • 21 posts
  • Corona SDK

+1 VS Code user. I’ve been using it since the beginning and I love it.

[TOPIC: post.html]
#18

theblueman82

[GLOBAL: userInfoPane.html]
theblueman82
  • Observer

  • 6 posts
  • Corona SDK

Same here, been using VS Code for years (sometimes even the insider's edition depending on what I want to do). It's also my main Python IDE (for Python, before that it was PyCharm for me).

Though it would be great if the VS Code Lua plugins are more organized and the intellisense functioning. I would love to see the devs release an official lua plugin/intellisense for VS Code (just a personal opinion).



[TOPIC: post.html]
#19

craig.stowers

[GLOBAL: userInfoPane.html]
craig.stowers
  • Observer

  • 29 posts
  • Corona SDK

I learned React.js in VS Code so I thought why not use one program for everything (moved from Sublime).

There are pros and cons but I'm still learning so my opinion is probably not that useful. I miss the jump to function (cmd+R?) in Sublime Text. There is a plugin you can install for LUA that lists the file functions down the left panel but I had to reformat my code to see them. It only sees top level functions in the file so I had to de-encapsulate all my "class" functions. Was a good chance to do a massive cleanup though. I let my code get pretty wild and so I welcome such a spring cleaning.
 




[topic_controls]
[/topic_controls]