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
Code completion inserts unnecessary tabstops in LSP #2975
That said - I want to check whether we can do away with the final tabstop here, as that might prevent it from occurring. In any case, I'd recommend leaving that setting off :-)
After some testing, I've decided to leave this as-is. Pre-LSP we would not include the additional tabstop, which meant this would not occur. However, you'd need to use the cursor key to move to after the comma.
In LSP, we have an additional tabstop which allows you to press <tab> after typing the argument value to jump after the tab. It feels slightly easier to hit <tab> than the cursor key to move after this, so I think it's worth keeping, given that we recommend snippetsPreventQuickSuggestions: false anyway.
I've changed my mind. This could affect a lot of people when moving to LSP as it never used to happen. The benefit of using tab is minor, but the annoyance for all users that haven't applied the recommended settings (likely most) is likely greater.
Activity
DanTup commentedon Dec 2, 2020
Can you try adding
"editor.suggest.snippetsPreventQuickSuggestions": false,to your VS Code settings, and see if that stops this from happening?I think it might be being caused by the extra tab-stop.
sooxt98 commentedon Dec 2, 2020
@DanTup that's quick reply, ya that's magic it fixed
sooxt98 commentedon Dec 2, 2020
microsoft/vscode#102580
DanTup commentedon Dec 2, 2020
Yeah, this is a common complaint. It is on the Dart-Code Recommended Settings page (https://dartcode.org/docs/recommended-settings/).
That said - I want to check whether we can do away with the final tabstop here, as that might prevent it from occurring. In any case, I'd recommend leaving that setting off :-)
[-]intellisense doesnt work with comma[/-][+]Code completion may be inserting unnecessary tabstops[/+][-]Code completion may be inserting unnecessary tabstops[/-][+]Code completion inserts unnecessary tabstops in LSP[/+]DanTup commentedon Dec 3, 2020
After some testing, I've decided to leave this as-is. Pre-LSP we would not include the additional tabstop, which meant this would not occur. However, you'd need to use the cursor key to move to after the comma.In LSP, we have an additional tabstop which allows you to press<tab>after typing the argument value to jump after the tab. It feels slightly easier to hit<tab>than the cursor key to move after this, so I think it's worth keeping, given that we recommendsnippetsPreventQuickSuggestions: falseanyway.DanTup commentedon Dec 3, 2020
I've changed my mind. This could affect a lot of people when moving to LSP as it never used to happen. The benefit of using tab is minor, but the annoyance for all users that haven't applied the recommended settings (likely most) is likely greater.
[Analyzer] Use ${0} for solo-tabstops in LSP snippets
DanTup commentedon Dec 7, 2020
Fixed by dart-lang/sdk@9a82c54, thought won't show up until you're using a new SDK that includes this fix.