Skip to content

Completion for @override doesn't work well at the end of a class #3182

@timsneath

Description

@timsneath

Describe the bug
DartCode is over-eager to offer class autocompletions to attributes. See the screenshot: here it should ideally be offering me @override as the completion, rather than trying to auto-import random classes from dart:io :)

To Reproduce
Create a class, attempt to add an override (e.g. toString())

Expected behavior
Either offer me autocomplete for available attributes, or don't offer me autocomplete. The proffered choices will always create a syntax error.

Screenshots
image

Versions (please complete the following information):

  • VS Code version: 1.54.1
  • Dart extension version: 3.20.1
  • Dart/Flutter SDK version: 2.0 stable

(preview LSP is on)

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 bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions