Looking for Visual Studio Computercraft editor

Started by TheTinyDeskEngineer, Sep 29, 2021, 03:12 PM

Previous topic - Next topic

TheTinyDeskEngineer

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.

Lupus590

Copied from the bot on the discord.
QuoteVisual Studio Code is the preferred code editor for writing ComputerCraft code. A number of extensions are available that improve CC programming:

- Lua by sumneko adds Lua autocomplete, highlighting, and error checking.
- ComputerCraft by JackMacWindows adds autocomplete for CC functions.

These have been packaged into one extension pack by Lemmmy.

In addition, the CraftOS-PC for VS Code 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 to the top of the file, after the first {.
3. Close the file, and the warnings should go away.

QuickMuffin8782

#2
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
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782

pjals_but_noisy

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
a

applejag

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

This makes it compatible with Sumneko's 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 existed, but now I can at least get CC intellisense while using vim :D

JeremyStarTM

#5
I use the ComputerCraft extension pack. It includes the Lua Language Server by sumneko and the ComputerCraft autocompletion by JackMacWindows. It provides up to date autocompletion for all CC: Tweaked APIs. The extension pack also provides a recommended configuration when you develop ComputerCraft scripts.
––––––––––––––––––––––––––––
JeremyStarTM @ The StarOpenSource Project
Maintainer of LiquidManager and the FREAX operating system.
––––––––––––––––––––––––––––