You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use completion commit characters so ( is only inserted when used to commit #2125
This is essentially a dupe of #687. We don't really have the context to know when a user is completing a function of whether it'll be correct to include parens on the end. The ideal solution IMO is that we never insert the parens, but if you're calling the function then you use the ( key to commit the completion (which would also insert it, and the closing one).
This is possible if you disable insertArgumentPlaceholders and turn on completionCommitCharacters, however there are other quirks in that behaviour which may make it worse (ultimately, I think that should be the end goal though).
I'll leave this open as a reminder that this still sucks (since the other issue is closed) and I'll try to work through the remaining issues that make using commit characters bad (or at least document the specifics).
changed the title [-]Code completion creates wrong results for methods assigned to void properties[/-][+]Use completion commit characters so `(` is only inserted when used to commit[/+]on Sep 7, 2020
I've added a preview flag to enable these when using LSP, though in my current testing it doesn't seem to be working. I've opened microsoft/vscode-languageserver-node#673.
Activity
DanTup commentedon Nov 26, 2019
This is essentially a dupe of #687. We don't really have the context to know when a user is completing a function of whether it'll be correct to include parens on the end. The ideal solution IMO is that we never insert the parens, but if you're calling the function then you use the
(key to commit the completion (which would also insert it, and the closing one).This is possible if you disable
insertArgumentPlaceholdersand turn oncompletionCommitCharacters, however there are other quirks in that behaviour which may make it worse (ultimately, I think that should be the end goal though).I'll leave this open as a reminder that this still sucks (since the other issue is closed) and I'll try to work through the remaining issues that make using commit characters bad (or at least document the specifics).
[-]Code completion creates wrong results for methods assigned to void properties[/-][+]Use completion commit characters so `(` is only inserted when used to commit[/+]DanTup commentedon Sep 22, 2020
I've added a preview flag to enable these when using LSP, though in my current testing it doesn't seem to be working. I've opened microsoft/vscode-languageserver-node#673.
DanTup commentedon Oct 21, 2020
With https://dart-review.googlesource.com/c/sdk/+/168653/, this is supported in LSP with the
dart.previewCommitCharacterssetting. I've opened #2895 as a reminder to enable it by-default in a future release.