#A way of including @cImport code completions

1 messages · Page 1 of 1 (latest)

glass plank
#

I'm using vscode with the zig language extension and zls, however cannot get my imported c code to show code completions or even arguments. Is there a fix for that?

nocturne bone
#

have you tried building the project and restarting your editor?

glass plank
#

yes ive tried both

nocturne bone
#

that it should normally work fine

glass plank
#

im not sure why but it doesnt ;-;

nocturne bone
#

can you share your build.zig?

grand pollen
#

I actually had this happen last week too; it had previously worked for completions, but stopped out of nowhere.

I ended up uninstalling the VSCode ZLS extension and the new installation process prompted something that I'd not seen when installing the first time and now everything is working. (still possible this is due to an error in your build.zig ofc, but if the code builds/runs and ZLS isn't working, I would definitely recommend trying this ^^)