Skip to content

Goto definition on operators #1151

@sharkdp

Description

@sharkdp

It would be great if I could go to the definition of unary and binary operators by clicking on ~ and @ in this snippet, for example:

https://play.ty.dev/ff786392-5dc1-439e-9f37-c990a5f4b1e7

from __future__ import annotations

class C:
    def __invert__(self) -> C:
        return C()

    def __matmul__(self, other) -> C:
        return C()

~C()

C() @ C()

Metadata

Metadata

Assignees

Labels

serverRelated to the LSP server

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions