Skip to content

Code completion inserts unnecessary tabstops in LSP #2975

Closed

Description

@sooxt98

Is there a way to disable auto comma before this this get fix?

vscode-flutter-suggesion

Activity

  1. DanTup commented on Dec 2, 2020

    @DanTup
    Member

    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.

  2. added
    awaiting infoRequires more information from the customer to progress
    on Dec 2, 2020
  3. sooxt98 commented on Dec 2, 2020

    @sooxt98
    Author

    @DanTup that's quick reply, ya that's magic it fixed

  4. sooxt98 commented on Dec 2, 2020

    @sooxt98
    Author
  5. DanTup commented on Dec 2, 2020

    @DanTup
    Member

    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 :-)

  6. reopened this on Dec 2, 2020
  7. removed
    awaiting infoRequires more information from the customer to progress
    on Dec 2, 2020
  8. added this to the v3.18.0 milestone on Dec 2, 2020
  9. added
    in editorRelates to code editing or language features
    on Dec 3, 2020
  10. changed the title [-]intellisense doesnt work with comma[/-] [+]Code completion may be inserting unnecessary tabstops[/+] on Dec 3, 2020
  11. changed the title [-]Code completion may be inserting unnecessary tabstops[/-] [+]Code completion inserts unnecessary tabstops in LSP[/+] on Dec 3, 2020
  12. DanTup commented on Dec 3, 2020

    @DanTup
    Member

    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.

  13. DanTup commented on Dec 3, 2020

    @DanTup
    Member

    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.

  14. DanTup commented on Dec 7, 2020

    @DanTup
    Member

    Fixed by dart-lang/sdk@9a82c54, thought won't show up until you're using a new SDK that includes this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions