Skip to content

Autocomplete appears when declaring DU #5974

Closed

Description

@gsomix

Autocomplete appears when typing DU cases both in Ionide and Rider.

Repro steps

Type:

module Test
    
type TestDU =
    | Il

autocomplete

autocomplete2

Expected behavior

No autocomplete at all, it's a declaration, not a general code.

Related information

  • Windows
  • Ionide 3.30.0
  • Rider 2018.3 EAP 7
> dotnet --version
2.1.500

Activity

  1. added this to the 16.0 milestone on Dec 11, 2018
  2. cartermp commented on Dec 11, 2018

    @cartermp
    Contributor

    Listing as a bug because it feels like one when you type, but this is really because we don't have a completion context for DU case declaration: https://github.com/Microsoft/visualfsharp/blob/e709f52b21db479c198aa7a62e5fd941429df4be/src/fsharp/service/ServiceUntypedParse.fs#L69

  3. modified the milestones: 16.0, 16.1 on Feb 21, 2019
  4. modified the milestones: 16.1, 16.2 on Apr 23, 2019
  5. modified the milestones: 16.2, Backlog on Apr 30, 2019
  6. added
    Impact-Low
    on Aug 26, 2020
  7. kerams commented on Jun 7, 2021

    @kerams
    Contributor

    @cartermp, I think in order to determine the context SyntaxVisitorBase would need to be extended. traverseSynTypeDefn currently only processes SynTypeDefnRepr.ObjectModel and SynTypeDefnSimpleRepr.TypeAbbrev with the comment enums/DUs/record definitions don't have any SynExprs inside them. Would it be acceptable to add 3 new visitor methods to cover these definition types? Maybe a question for Don?

  8. cartermp commented on Jun 7, 2021

    @cartermp
    Contributor

    Yeah, I think that's going to be pretty much the only way to handle this without writing a different parser. I'd be happy to look at a draft PR for general direction and we can see if that's acceptable as API additions.

  9. gsomix commented on Dec 21, 2021

    @gsomix
    ContributorAuthor

    Is it fixed in #12351? @kerams

  10. kerams commented on Dec 21, 2021

    @kerams
    Contributor

    In VS it should be. Hopefully the next preview will contain it. Other editors will need to reimplement #12351 (I think?), but they can lean on #11641.

  11. gsomix commented on Dec 21, 2021

    @gsomix
    ContributorAuthor

    @kerams Thank you! I'm closing it. :)

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

    Area-LangService-APIBugImpact-Low

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions