Skip to content

Enum members do not use EnumMember SymbolKind #2945

@JCKodel

Description

@JCKodel

Describe the bug
There are some inconsistences of VSCode SymbolKind for building extensions.

To Reproduce
I've forked the https://github.com/alefragnani/vscode-separators VSCode extension to add more separators (the original code only works on SymbolKind.Method, SymbolKind.Function and SymbolKind.Constructor). This extensions draws a line separating methods on any VSCode supported language.

While working on it to add more places where separators are placed, there are some minor inconsistences, as follow:

The extension is filtering i.SymbolKind.Method, i.SymbolKind.Function, i.SymbolKind.Constructor, i.SymbolKind.Class, i.SymbolKind.Enum, i.SymbolKind.Interface, but:

image

There is a SymbolKind.EnumMember and a SymbolKind.Enum. I'm requesting only SymbolKind.Enum but the screenshot shows separators on each member.

(A question: extension ModuleExtension on Module { should trigger which SymbolKind?)

image

The SymbolKind.Method (or .function) leaves the @override attribute outside the method itself. I don't know how the definition of SymbolKind works, but would be nice if the SymbolKind.Method (or really any of them) considerer the starting point before the attributes (so the line would be draw above the @override).

(Another question: when using SymbolKind.Property, a separator is drawn before get and another before set. It would be awesome if a pair of get/set should trigger SymbolKind.Property only once, to get only one separator for the pair).

Versions (please complete the following information):

  • VS Code version: 1.51.0
  • Dart extension version: 3.16.0
  • Dart/Flutter SDK version: 1.22.3

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