VSCode Autocomplete

,

Hi there,

Just setting up a dev environment in VSCode with the SDK on Windows. I have Lua extensions installed but code completion seems to be acting a little strange.

I can type playdate.graphics.fillCircleAtPoint and get the code competition and documentation.

function playdate.graphics.fillCircleAtPoint(x, y, radius) function playdate.graphics.fillCircleAtPoint(point, radius))

This is working as intended.

However, when I try to do something like playdate.graphics.fillRect, it doesn't recognise the function and I get an unknown. The code still compiles and runs, displaying both the rect and the circle as intended.

image

The autocompletion seems to be missing for a number of functions and working for several others. I can't figure out why.

I'm currently using the following template by Whitebrim to test this.

Any ideas?

The VSCode Lua intellisense only picks up Lua functions defined in the PlayDate CoreLibs files. I think fillRect is implemented in C and exposed to the Lua VM at runtime, so it’s not visible to VSCode without adding a stub definition of some sort.

2 Likes

Hello there,
i start to develop with SDK, and notice the same ISSUE.
I asking od discord for the problem and an youser reply this:

Looks like it's missing in the VS Code completion file; got it into our bug tracker. Thanks.

as if the problem could be solved...
Discord: Playdate Squad
Channel: developer

I attach the screen of discussion on this reply.