ComputerCraft Forums

General => General => Topic started by: TheTinyDeskEngineer on Sep 29, 2021, 03:12 pm

Title: Looking for Visual Studio Computercraft editor
Post by: TheTinyDeskEngineer on Sep 29, 2021, 03:12 pm
In all of the time that I've played with Computercraft I've spent quite a bit of that time getting confusing problems which are hard to solve. I thought that it might be better if I use Visual Studio to create and edit Computercraft lua code. But I can't find anything useful on Google, as always. I'm using Visual Studio Community 2019.
Title: Looking for Visual Studio Computercraft editor
Post by: Lupus590 on Sep 29, 2021, 09:44 pm
Copied from the bot on the discord (https://discord.gg/H2UyJXe).
QuoteVisual Studio Code (https://code.visualstudio.com/) is the preferred code editor for writing ComputerCraft code. A number of extensions are available that improve CC programming:

- Lua (https://marketplace.visualstudio.com/items?itemName=sumneko.lua) by sumneko adds Lua autocomplete, highlighting, and error checking.
- ComputerCraft (https://marketplace.visualstudio.com/items?itemName=jackmacwindows.vscode-computercraft) by JackMacWindows adds autocomplete for CC functions.

These have been packaged into one extension pack (https://marketplace.visualstudio.com/items?itemName=lemmmy.computercraft-extension-pack) by Lemmmy.

In addition, the CraftOS-PC for VS Code (https://marketplace.visualstudio.com/items?itemName=jackmacwindows.craftos-pc) extension by JackMacWindows adds integration with CraftOS-PC, as well as a remote terminal and file viewer for standard CC.

By default, the Lua extension will highlight ComputerCraft functions with warnings since it doesn't know they exist. This can be fixed by adding them to the settings:

1. Press Ctrl+Shift+P (Command+Shift+P on Mac), type in "Preferences: Open Settings (JSON)", and press Enter.
2. Add the text from this file (https://pastebin.com/fVTvu4Bw) to the top of the file, after the first {.
3. Close the file, and the warnings should go away.
Title: Looking for Visual Studio Computercraft editor
Post by: QuickMuffin8782 on Sep 30, 2021, 11:10 pm
Quote from: TheTinyDeskEngineer on Sep 29, 2021, 03:12 pmIn all of the time that I've played with Computercraft I've spent quite a bit of that time getting confusing problems which are hard to solve. I thought that it might be better if I use Visual Studio to create and edit Computercraft lua code. But I can't find anything useful on Google, as always. I'm using Visual Studio Community 2019.
You can also use ZeroBrane Studio. It also works with CC and is a good editor to use as it useful for compatibility with syntax highlighting for CC (w/o adding a addon for it ;)) and lua, and is useful for seeing your code in the left sidebar in a easy-to-understand UI.

Link: https://studio.zerobrane.com/download?not-this-time
Title: Looking for Visual Studio Computercraft editor
Post by: pjals_but_noisy on Oct 25, 2021, 05:22 pm
Quote from: QuickMuffin8782 on Sep 30, 2021, 11:10 pm
Quote from: TheTinyDeskEngineer on Sep 29, 2021, 03:12 pmIn all of the time that I've played with Computercraft I've spent quite a bit of that time getting confusing problems which are hard to solve. I thought that it might be better if I use Visual Studio to create and edit Computercraft lua code. But I can't find anything useful on Google, as always. I'm using Visual Studio Community 2019.
You can also use ZeroBrane Studio. It also works with CC and is a good editor to use as it useful for compatibility with syntax highlighting for CC (w/o adding a addon for it ;)) and lua, and is useful for seeing your code in the left sidebar in a easy-to-understand UI.

Link: https://studio.zerobrane.com/download?not-this-time
i know this is an old post, but vscode also works with different languages than lua
Title: Looking for Visual Studio Computercraft editor
Post by: applejag on Apr 24, 2022, 08:59 pm
I've recently spend some dead time in rewriting the wiki as EmmyLua annotations, and can be found here: https://github.com/jilleJr/CC-Tweaked-EmmyLua (https://github.com/jilleJr/CC-Tweaked-EmmyLua)

This makes it compatible with Sumneko's Lua language server (https://github.com/sumneko/lua-language-server (https://github.com/sumneko/lua-language-server)), which can be installed in various editor, including:

- VS Code
- VS Codium (OSS version of VS Code)
- (Neo)vim via coc.nvim

I made it before I knew https://github.com/MCJack123/vscode-computercraft (https://github.com/MCJack123/vscode-computercraft) existed, but now I can at least get CC intellisense while using vim :D