Skip to content

Support definition aka Go To Definition #28

@multimeric

Description

@multimeric

This is the first thing I looked for in swls, but it doesn't seem to be supported. Basically I want to be able to Ctrl+Click on an IRI and for the editor to jump to its definition. My use case is for JSON-LD, but it should be doable for other serialization formats too.

For example, if you have:

{
    "@graph": [
        {
             "@id": "https://foo.com",
             "somePredicate": "foo"
        },
        {
            "@id": "https://bar.com",
            "otherPredicate": {"@id": "https://foo.com"}
        }
    ]
}

Then you click on the {"@id": "https://foo.com"} on line 9, it should jump you to line 4 or so, where the entity is defined.

This is the relevant part of the LSP spec. I'm happy to write this feature if a maintainer expresses interest in it being merged.

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