Skip to content

Issues with Document Symbols Responses from dotty language server #7673

Closed
@andreamocci

Description

@andreamocci

In the context of a R&D project we're investigating, we've been recording data provided by the dotty LSP and we found the following issues related to the document symbols responses (spec here):

Ranges. The ranges of symbols correspond to the ranges of their identifiers, not the whole symbol. This has the effect of completely disabling the breadcrumb feature in VSCode and 'flattening' the tree structure of symbols.

Screenshots:

Flattened Symbol Hierarchy

Missing Breadcrumb

Top level methods. The top level methods, at the moment, seem to be wrapped in a synthetic package object, and the language server is returning it. It should be handled as Worksheet wrappers (thus excluding the synthetic container).

Missing symbol kinds. The language server is not returning all the proper symbol kinds - thus, traits and enums are shown as classes, and enum values are shown as fields.

Missing locals. The language server is not showing locals. This is due to the fact that the visitor used to retrieve defs explicitly excludes locals.

Container Names. The container names returned in the document symbol responses should be stripped of the module class suffix as the name of the symbols. However, for synthetic containers of top level methods, one should properly determine the container. Conceptually, top level methods should be contained in the package itself (so the owner of the synthetic package object).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions