Giter VIP home page Giter VIP logo

Comments (3)

peabnuts123 avatar peabnuts123 commented on May 18, 2024

Thanks for the feedback 🙂 Looks like I've got some junk lying around in that pico8 repo. CoreCLR is from the C# extension - it is just a hack to make the launch.json run an arbitrary executable (that whole repo also only runs on Windows atm which is ... suboptimal). So yeah sorry you mightn't have much luck with that repo! It is a bit of a dumping ground atm.

As for getting the definitions going, they have an undocumented limitation at the moment that you cannot edit directly in the .p8 file, you have to use an #include something.lua and then write your code in a separate lua file. That limitation is mostly because the Lua language server doesn't run for .p8 files. I am yet to have a look to see if I can get a setup running for .p8 files directly.

Lastly no these are JUST completion definitions for EmmyLua. So you need that in order to use it. As mentioned the sumneko.lua extension provides that, as well as syntax highlighting and language features for Lua. It's my recommendation for editing Lua in vscode.

Circling back to my first point, if you want to edit the .p8 file directly you will need one of the pico8 extensions found on the marketplace. This is the one I have installed but as the Lua language server doesn't actually run in this context (unless I can figure out how to achieve that) then it is little more than syntax highlighting, and not very useful.

TL;DR

  • Sorry, my pico8 repo is a mess
  • You cannot use these definitions yet with editing .p8 files directly, you need to use an #include
  • You need an extension for vscode to work with Lua in the first place, I recommend this one.

from pico8-emmylua-definitions.

PJaros avatar PJaros commented on May 18, 2024

Thank you for your feedback.

I'm currently trying to break down my 500+ lines-of-code "game" into something more managable, thus I don't mind editing lua-files instead of a p8-file.

I am willing to learn some C# if necessary. C# is supported with Mono on Linux and MacOS. It's just that I'm neither an expert on C#, lua, p8 or js so these are hurdles which slows my progress configuring a good editor and build system.

from pico8-emmylua-definitions.

peabnuts123 avatar peabnuts123 commented on May 18, 2024

I'm currently trying to break down my 500+ lines-of-code "game" into something more managable, thus I don't mind editing lua-files instead of a p8-file.

I agree with the sentiment implied here - it's probably better practise to code your game in a series of files that are all "included" instead of just editing everything in the pico8 editor / .p8 file. It might not be quite in the spirit of PICO8 but I think it is worth the tradeoff of having a maintainable project!

I am willing to learn some C# if necessary. C# is supported with Mono on Linux and MacOS. It's just that I'm neither an expert on C#, lua, p8 or js so these are hurdles which slows my progress configuring a good editor and build system.

I assume this is in reference to the C# extension. I may not have been clear in my earlier reply - the reliance in the C# extension was a complete oversight by myself. I didn't stop to realise that coreclr is a C# "launch type". You simply need to have the extension (and to be running on windows) for that launch configuration to work. It has a dependency on the C# extension but does use C# to any degree haha. It's a complete mistake. Sorry for that or any confusion there! Try installing it and give it a go if you'd like to get it working.

However, you should still have Lua and PICO8 autocomplete/intellisense options when editing a .lua file in that repo even if you don't have that C# extension installed. Let me know if you don't!

from pico8-emmylua-definitions.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.