Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
473 stars 101 forks source link

No Autocomplete For Zig LSP #42

Closed Umi-L closed 1 year ago

Umi-L commented 1 year ago

Hello! Recently while using this library I noticed that the zig LSP was unable to find any of the function signatures for autocompletion. The type for the Raylib include is unknown and there are no autocomplete. I have included screenshots of both of these things below.

while searching for solutions I found another person who uploaded a youtube video had the same issue.

here is that video with the timestamp included.

I am using the stock LSP plugin for vscode and the latest stable release of zig. Any help is appreciated; thanks!

image

image

Not-Nik commented 1 year ago

Seems to be related to https://github.com/zigtools/zls/issues/1218, but we can't just remove the usingamespace, because the function definitions are generated by a script. I'll look into possible restructuring of how the library files are created to avoid this issue

Not-Nik commented 1 year ago

Should be fixed in af773c79e2c8cca590b726be00b46c17f0ab8fed

Not-Nik commented 1 year ago

From my own testing this works properly now