Skip to content

Code completion at the top of non-empty maps in analysis_options.yaml and pubspec.yaml shows incorrect completions #59827

Open
@FMorschel

Description

@FMorschel

Working as intented

If you have on analysis_options.yaml the following:

include: package:lints/recommended.yaml

linter:
  rules:
    - ^

analyzer:
  enable-experiment:
    - ^

On either ^ it will show you the possible rules for lints or possible experiments we have.

If you trigger auto-complete (CTRL + Space) on the left of the file, it will show you the sections; analyzer, linter, code-style, etc.


NOT Working as intended

If you do that with one indentation inside analyzer it still shows the same as the previous paragraph.

If you do that on ^ below:

analyzer:
  language:
    ^

Here is the output:

image

This is a mix of the possible entries for the analyzer section and the entire file-valid sections and (at the end because this is alphabetically sorted) the valid options for the analyzer.language section (strict-inference, strict-casts, etc).


Also, on another note, we can't do with the analyzer.language section what we can with the linter.rules section of posting them on a list. We need to add each one with : true (again, the auto-complete here is totally lost when it would show true/false options it shows a lot more).


Related to #57034.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestanalyzer-analysis-optionsarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-completionIssues with the analysis server's code completion featuretype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions