Is there a way to configure run to rebuild the pdx if the lua has changed? currently I am clean/building each cycle.
if you are on linux just use cmake its easier.
I had quite a struggle to get CLion working correctly with Playdate. I gave up and went with VS Code and it's working great:
How odd. Clion works perfectly for me. I was wondering if anyone had a tip on how to autoclean as a build step.
So I guess the problem you are having is that CLion is not detecting the Lua changes to trigger a rebuild, right? It might not be the ideal solution, but you can set up CLion to automatically run pdc on your Source folder before running your game. That way, any changes to your Lua code will be compiled without cleaning and rebuilding your whole project. (Although technically it will run pdc twice in a row when you make any changes to your C code).
Here is how to set it up, you need to edit your Run configuration:
Add an external tool that will run AFTER your Build, but before your launch.
In order to use $CMakeCurrentProgramArguments$, you have to set the program arguments for PlaydateSimulator.exe to your pdx folder like in the first image. Also make sure to put quotation marks around your paths if you have any spaces in the directories.
ah yes, that is it! yes, not totally ideal, but it is okay!