-
Notifications
You must be signed in to change notification settings - Fork 56
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
Completion of enums in switch #292
Comments
Also, would be nice to only get currently unmatched constructors in completion results |
Well, I think the enum case makes even more sense than the loop case. It may well be that you want to put a pattern in place of the variable (instead of just renaming it). Jumping to the end of the line is one key, while if the cursor were at the end of the line, going back to |
Good point, I think that's actually the primary reason I implemented it like that (for some reason I didn't think of it just now). So yeah, I don't think we should change that. |
I think last time we discussed this we concluded that it would be nice to make the behavior depend on what key you press to make the selection. |
I don't think that's possible with the VSCode / LSP Api. |
Yes that's what you said the last time too. |
The problem is that right now there is no easy way to just write I would say that 95% or more matches are done on variables without complex patterns so we should optimize for this case. And it's not like for loop because here the variables have a meaning based on the way they were declared in original enum. |
Uhm,
For me it's the opposite. Taking the particular example, I find |
Perhaps
As I said, I don't think there's a way to conditionalize what's inserted based on which character is pressed. |
I think |
Up ? |
When completing a switch case, constructors are now correctly inserted which is good:
However the cursor seems to be set after the first argument whereas when there is no argument it's correctly set after the semicolon
:
PS: I now about
t.switch
completion, just want also the single case completion to slightly improve :)The text was updated successfully, but these errors were encountered: