Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.24 KB

lsp-spec.md

File metadata and controls

49 lines (34 loc) · 1.24 KB

owlsp specification

owlsp, or cargo-owlsp, is an LSP server which provides RustOwl information. To display various types of decorations, owlsp supports some custom methods from the client.

Here, we describe the specifications of those custom methods.

Types

Here, we describe the types we will use in this document.

OprType

"lifetime" | "imm_borrow" | "mut_borrow" | "move" | "call" | "outlive"

Decoration

{
    "type": OprType,
    "range": Range,
    "hover_text": Option<String>,
    "is_display": bool
}

Methods

We describe the custom methods used in owlsp.

rustowl/cursor

Request payload

{
    "position": Position,
    "document": {
        "uri": DocumentUri
    }
}

Response payload

{
    "decorations": [Decoration]
}