grumpydev / pico8vscodeeditor

A plugin for VSCode for Pico8 development, with basic Lua language and Pico8 API support.
MIT License
25 stars 6 forks source link

Errors for #include'd .lua files that use pico-8 concise syntax [0.2.3] #3

Closed hlship closed 5 years ago

hlship commented 5 years ago

image

This code would be allowed in a .p8 file; I'd like to be able to use it in a .lua file that is in the project with my .p8 file.

hlship commented 5 years ago

Workaround:

Rename the file to .p8, and add following to top of file:

pico-8 cartridge // http://www.pico-8.com
version 18
__lua__

Change the #include to use the .p8 extension.

grumpydev commented 5 years ago

This editor is just for p8 files, which is the extension for pico8 files, it does nothing for lua files.

sparr commented 3 weeks ago

You can manually "Change Language Mode" to pico8 when viewing your .lua file, or even configure an association of .lua files with the pico8 language, specific to your workspace or project so it doesn't affect loading lua files in other workspaces or projects.