ExDaytona.Api.Lsp (ex_daytona v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Lsp.

Summary

Functions

Get code completions Get code completion suggestions from the LSP server

Notify document closed Notify the LSP server that a document has been closed

Notify document opened Notify the LSP server that a document has been opened

Get document symbols Get symbols (functions, classes, etc.) from a document

Start LSP server Start a Language Server Protocol server for the specified language

Stop LSP server Stop a Language Server Protocol server

Get workspace symbols Search for symbols across the entire workspace

Functions

completions(connection, lsp_completion_params, opts \\ [])

Get code completions Get code completion suggestions from the LSP server

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • lsp_completion_params (LspCompletionParams): Completion request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.CompletionList.t} on success
  • {:error, Tesla.Env.t} on failure

did_close(connection, lsp_document_request, opts \\ [])

@spec did_close(Tesla.Env.client(), ExDaytona.Model.LspDocumentRequest.t(), keyword()) ::
  {:ok, nil}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Notify document closed Notify the LSP server that a document has been closed

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • lsp_document_request (LspDocumentRequest): Document request
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

did_open(connection, lsp_document_request, opts \\ [])

@spec did_open(Tesla.Env.client(), ExDaytona.Model.LspDocumentRequest.t(), keyword()) ::
  {:ok, nil}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Notify document opened Notify the LSP server that a document has been opened

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • lsp_document_request (LspDocumentRequest): Document request
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

document_symbols(connection, language_id, path_to_project, uri, opts \\ [])

@spec document_symbols(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, [ExDaytona.Model.LspSymbol.t()]}
  | {:error, Tesla.Env.t()}

Get document symbols Get symbols (functions, classes, etc.) from a document

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • language_id (String.t): Language ID (e.g., python, typescript)
  • path_to_project (String.t): Path to project
  • uri (String.t): Document URI
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%LspSymbol{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

start(connection, lsp_server_request, opts \\ [])

@spec start(Tesla.Env.client(), ExDaytona.Model.LspServerRequest.t(), keyword()) ::
  {:ok, nil}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Start LSP server Start a Language Server Protocol server for the specified language

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • lsp_server_request (LspServerRequest): LSP server request
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

stop(connection, lsp_server_request, opts \\ [])

Stop LSP server Stop a Language Server Protocol server

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • lsp_server_request (LspServerRequest): LSP server request
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

workspace_symbols(connection, query, language_id, path_to_project, opts \\ [])

@spec workspace_symbols(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, [ExDaytona.Model.LspSymbol.t()]}
  | {:error, Tesla.Env.t()}

Get workspace symbols Search for symbols across the entire workspace

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • query (String.t): Search query
  • language_id (String.t): Language ID (e.g., python, typescript)
  • path_to_project (String.t): Path to project
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%LspSymbol{}, ...]} on success
  • {:error, Tesla.Env.t} on failure