-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No autocomplete for packages #465
Comments
not a bug |
That's not helpful either. |
That essential features like this are ignored in zig tooling is one of the things holding zig back. |
Note that:
|
It is the tooling currently available and its an issue on zls not zig so the issue is still relevant imho. |
zig does a lot of great things, but its good to remember it is still in its early stages. tooling (both official and community) is in a "best effort" situation right now. if this is a issue of great inspiration to you, then research/a pr is very much welcome. sorry for being crude earlier, I was going through a lot of notifications at the time |
I know that maintenance of zls has changed hands a few times, and that makes it difficult knowing what’s a bug, when regressions have taken place, etc. Big thanks to @nektro for taking on a lot of the responsibilities! I remember from way back looking into how zls worked and this function came to mind: Line 121 in fd2a863
From what I can tell zls is supposed to autocomplete packages, but there must have been a regression. I think as a community we could pour a little more love into our third-party tools like zls. The @ZigEmbeddedGroup is committed to improving the workflow for imported packages in zls — it’s invaluable for working with register definitions. In addition to this we’ll likely be the ones stressing performance and this will lead to more improvements that the community will benefit from. |
Works for me on the latest master (ab62e58) |
Also works for me. |
If i attempt to import a package (whether through
exe.addPackagePath
or with astd.build.Pkg
withexe.addPackage
), i get no autocompletion or any language features if i try to import said package in mymain.zig
file, exconst glfw = @import("glfw");
even though it builds and runs fine, but if i import the package manually by file exconst glfw = @import("../deps/mach-glfw/src/main.zig");
, completion does work, but it does not build due to aimport of file outside package path
error (which zls should probably show)The text was updated successfully, but these errors were encountered: