# The RustOwl LSP specification ## Table of Contents - [The RustOwl LSP specification](#the-rustowl-lsp-specification) - [Table of Contents](#table-of-contents) - [Types](#types) - [`OprType`](#oprtype) - [`Decoration`](#decoration) - [Methods](#methods) - [`rustowl/cursor`](#rustowlcursor) - [Request payload](#request-payload) - [Response payload](#response-payload) `rustowl`, is an LSP server which provides RustOwl information. To display various types of decorations, RustOwl 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` ```typescript "lifetime" | "imm_borrow" | "mut_borrow" | "move" | "call" | "outlive" | "shared_mut" ``` ### `Decoration`
{
    "type": OprType,
    "range": Range,
    "hover_text": Option<String>,
    "overlapped": bool
}
`overlapped` field indicates that the decoration is overlapped and should be hidden. ## Methods We describe the custom methods used in RustOwl. ### `rustowl/cursor` #### Request payload
{
    "position": Position,
    "document": {
        "uri": DocumentUri
    }
}
#### Response payload
{
    "is_analyzed": bool,
    "decorations": [Decoration]
}