Skip to content

On unclosed impl, documentSymbol symbol name can span many lines #16743

Open
@krobelus

Description

@krobelus

I'm not sure if there's anything to do here but I found this interesting.

No minimal reproducer but it should be reproducible on any impl block like below.
Cursor is at |

impl Foo<|
impl Bar<Baz> for Baz {
    ...
}

Now textDocument/documentSymbol will report a symbol with a name that starts at
impl Foo and spans across the impl Bar block and even further (in my case,
another impl block and a global function). I think it would be more intuitive to not report a symbol, or give it the name impl Foo<.

As workaround I'll truncate symbol names after the first line for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserparser issuesC-supportCategory: support questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions