Sign Up

LSP

Request completions

POST
/lsp/completions

Query textDocument/completion and normalize the reply to the daemon's stable CompletionList wire shape.

Request Body

application/json
  1. body

Completion request body forwarded to textDocument/completion.

context?null|
languageId*string

The LSP language key (python, typescript).

pathToProject*string

Absolute project root path used as the server's workspace root.

position*

Cursor position for which completions are requested.

uri*string

Document URI, typically a file:// URI.

Response Body

Normalized completion list.

application/json
  1. response

Normalized completion response shape.

isIncomplete*boolean

Whether the server considers the list incomplete and expects re-querying.

items*array<>

Completion items, with non-contract keys pruned.

curl -X POST 'http://sandbox:2280/lsp/completions' \  -H 'Content-Type: application/json' \  -d '{  "languageId": "string",  "pathToProject": "string",  "position": {    "character": 0,    "line": 0  },  "uri": "string"}'
{  "isIncomplete": true,  "items": [    {      "detail": "string",      "documentation": null,      "filterText": "string",      "insertText": "string",      "kind": 0,      "label": "string",      "sortText": "string"    }  ]}

Notify LSP did-close

POST
/lsp/did-close

Send textDocument/didClose to the running language server.

Request Body

application/json
  1. body

Identifies one document within a language-server workspace.

languageId*string

The LSP language key (python, typescript).

pathToProject*string

Absolute project root path used as the server's workspace root.

uri*string

Document URI, typically a file:// URI.

Response Body

Close notification sent.

curl -X POST 'http://sandbox:2280/lsp/did-close' \  -H 'Content-Type: application/json' \  -d '{  "languageId": "string",  "pathToProject": "string",  "uri": "string"}'
Empty

Notify LSP did-open

POST
/lsp/did-open

Read the document from disk and send textDocument/didOpen to the running language server.

Request Body

application/json
  1. body

Identifies one document within a language-server workspace.

languageId*string

The LSP language key (python, typescript).

pathToProject*string

Absolute project root path used as the server's workspace root.

uri*string

Document URI, typically a file:// URI.

Response Body

Open notification sent.

curl -X POST 'http://sandbox:2280/lsp/did-open' \  -H 'Content-Type: application/json' \  -d '{  "languageId": "string",  "pathToProject": "string",  "uri": "string"}'
Empty

List document symbols

GET
/lsp/document-symbols

Query textDocument/documentSymbol for one document and normalize the result to flat SymbolInfo rows.

Query Parameters

query?string

Workspace-symbol search string; required on /lsp/workspacesymbols, omitted on /lsp/document-symbols.

languageId?string

The LSP language key (python, typescript); required by both symbol routes.

pathToProject?string

Absolute project root path used as the server's workspace root; required by both symbol routes.

uri?string

Document URI for /lsp/document-symbols; omitted on /lsp/workspacesymbols.

Response Body

Normalized document symbols.

application/json
  1. response
[index: integer]?

One document or workspace symbol.

curl -X GET 'http://sandbox:2280/lsp/document-symbols'
[  {    "kind": 0,    "location": {      "range": {        "end": {          "character": 0,          "line": 0        },        "start": {          "character": 0,          "line": 0        }      },      "uri": "string"    },    "name": "string"  }]

Start an LSP server

POST
/lsp/start

Start or reuse the language server for one (languageId, pathToProject) workspace.

Request Body

application/json
  1. body

Identifies a language-server instance for one language and one project root.

languageId*string

The LSP language key (python, typescript).

pathToProject*string

Absolute project root path used as the server's workspace root.

Response Body

Server started or was already running.

curl -X POST 'http://sandbox:2280/lsp/start' \  -H 'Content-Type: application/json' \  -d '{  "languageId": "string",  "pathToProject": "string"}'
Empty

Stop an LSP server

POST
/lsp/stop

Stop the language server for one (languageId, pathToProject) workspace.

Request Body

application/json
  1. body

Identifies a language-server instance for one language and one project root.

languageId*string

The LSP language key (python, typescript).

pathToProject*string

Absolute project root path used as the server's workspace root.

Response Body

Server stopped.

curl -X POST 'http://sandbox:2280/lsp/stop' \  -H 'Content-Type: application/json' \  -d '{  "languageId": "string",  "pathToProject": "string"}'
Empty

List workspace symbols

GET
/lsp/workspacesymbols

Query workspace/symbol for one workspace and normalize the result to flat SymbolInfo rows.

Query Parameters

query?string

Workspace-symbol search string; required on /lsp/workspacesymbols, omitted on /lsp/document-symbols.

languageId?string

The LSP language key (python, typescript); required by both symbol routes.

pathToProject?string

Absolute project root path used as the server's workspace root; required by both symbol routes.

uri?string

Document URI for /lsp/document-symbols; omitted on /lsp/workspacesymbols.

Response Body

Normalized workspace symbols.

application/json
  1. response
[index: integer]?

One document or workspace symbol.

curl -X GET 'http://sandbox:2280/lsp/workspacesymbols'
[  {    "kind": 0,    "location": {      "range": {        "end": {          "character": 0,          "line": 0        },        "start": {          "character": 0,          "line": 0        }      },      "uri": "string"    },    "name": "string"  }]