Skip to content

Improve overall document symbols outline for both Zig and ZON files #3232

Description

@jassielof

Current behavior

Currently, the document symbols are vague and don't quite represent the symbols true intent, for example:

Image

Where the Encoding enumeration and imported modules are just represented as constants. Even with issues such as classifying tests as methods, and structure methods as functions regardless.

Expected behavior

Ideally, as shown below:

Image

These should be represented with their respective symbols:

  • Enumeration for enumerations
  • Modules for imported modules
  • etc.

Classification

  • Methods: structure methods
  • Test cases: functions
  • Enumerations and error sets/unions as enumerations
  • Imported files as their respective introspected kind: either structure or namespace (a field-less structure).
  • Imported aliases as their respective introspected kind: such as a const json_parse = std.json.parseFromSlice; resolves as a function.

ZON files

These simply don't have any outline at all. Ideally, this should be shown similar to a JSON outline, such as:

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions