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
LSP code completion should have an option to include parens and/or args #2823
Comments
Do you have the The expected fix (once commit characters work correctly) is that you press I couldn't actually repro your TS example - when I complete on |
Yes. I have the |
Commit characters don't currently work on either LSP or not. I'd like to have them working on LSP, though I hit a problem in VS Code that I haven't fixed yet. Hoping to progress that soon. |
Fixes Dart-Code/Dart-Code#2823. Change-Id: I477aba5f3563c01a85bb867a1e01f294eed3636e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171585 Commit-Queue: Danny Tuppeny <danny@tuppeny.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Fixed by dart-lang/sdk@8687aa6. When using a new SDK that includes that change, the |
Fantastic! Thank you for making this a reality. Look forward to trying it ❤️ |
Should this be available at this point?
dart-code 3.17.0 Still isn't adding parentheses or argument placeholders. |
@Merrit Have you got the LSP preview enabled, and reloaded VS Code since enabling it? I tested with the same version of Flutter and it seems to be included there: If you're still not seeing it with LSP enabled, please file a new issue and we can capture some logs to understand what's happening. Thanks! |
Double checked LSP seems to be enabled. This does seem to work with something like a function I wrote myself, but not some other things like print() or widgets. I opened an issue: #2992 |
Ah, I see. I'll do some digging and follow up in that issue. Thanks! |
I have the same issue, when I disable Dart:Preview LSP then the code completion with parens and/or args works! |
@JoyEnergiser see the comment above. There's a new setting to control this in LSP, but it requires an SDK that includes the setting (which is not currently true of Flutter's stable branch, although it should be in the next major stable release). |
still not working for me... tried disabling LSP, tried the recommended |
Sorry got it working, you have to uncheck commit characters as well. |
Describe the bug
I'm unable to add parenthesis and give parameters to a function using tab to go to the next parameter.
To Reproduce
Below is a recording of my screen that demonstrates the issue.
Expected behavior
Below is a recording of my screen while I autocomplete a simple
console.log()
statement. This is how the autocomplemetion on Dart code should've worked.Insert Argument Placeholder
option is enabled andenableCompletionCommitCharacters
option is disabled.Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: