-
-
Notifications
You must be signed in to change notification settings - Fork 297
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 type completions for primitive types like u16, u32, f32 etc. #1995
Comments
completions for integer types were intentionally removed in #1681. I am not necessarily against adding them back but the PR has given a good reason for their removal. If we were to add them back, we would to find a way to make them less annoying when they are unwanted. |
@Techatrix as someone that just started learning Zig, the lack of valid type completions does feel a bit odd. However I also understand how they might become annoying when other completion options are preferred... |
If we can ensure that other completions take priority over things like integer types then I don't see why we couldn't add them back. Related #1792
filtering completions when completing a type annotation is definitely something that should be considered. This is similar to what I have a proposed in #1845 since type annotation also have Result Locations. I will add another example to that issue. |
@Techatrix that sounds reasonable! I definitely think that an specific change for this isn't worth it if there's already ongoing work/discussions around completions :) |
Integer type completions for There may be circumstances where in fact only a subset of those integer types are valid completions, but I'm struggling a bit to pinpoint when that might be. A case could be made that Either way, I do recognize that integer type completions might be somewhat useful for learners, but I think it's better to favor intermediate and advanced users on this point, where such completions would just be noise. Even for learners, the absence of oddball types like, say, |
Zig Version
0.13.0
Zig Language Server Version
Not sure how to check this
Client / Code Editor / Extensions
Neovim
Steps to Reproduce and Observed Behavior
Start typing
const x: u
. No completions for the variable type are shown.Expected Behavior
For completions like
u16
to be displayed.Relevant log output
No response
The text was updated successfully, but these errors were encountered: