LspServer
LspServer class for Daytona SDK.
Constructors
new LspServer()
def initialize(language_id:, path_to_project:, toolbox_api:, sandbox_id:)Parameters:
language_idSymbol -path_to_projectString -toolbox_apiDaytonaToolboxApiClient:LspApi -sandbox_idString -
Returns:
LspServer- a new instance of LspServer
Methods
language_id()
def language_id()Returns:
Symbol
path_to_project()
def path_to_project()Returns:
String
toolbox_api()
def toolbox_api()Returns:
DaytonaToolboxApiClient:LspApi
sandbox_id()
def sandbox_id()Returns:
String
completions()
def completions(path:, position:)Gets completion suggestions at a position in a file
Parameters:
pathString -positionDaytona:LspServer:Position -
Returns:
DaytonaApiClient:CompletionList
did_close()
def did_close(path)Notify the language server that a file has been closed. This method should be called when a file is closed in the editor to allow the language server to clean up any resources associated with that file.
Parameters:
pathString -
Returns:
void
did_open()
def did_open(path)Notifies the language server that a file has been opened. This method should be called when a file is opened in the editor to enable language features like diagnostics and completions for that file. The server will begin tracking the file’s contents and providing language features.
Parameters:
pathString -
Returns:
void
document_symbols()
def document_symbols(path)Gets symbol information (functions, classes, variables, etc.) from a document.
Parameters:
pathString -
Returns:
Array\<DaytonaToolboxApiClient:LspSymbol]
sandbox_symbols()
def sandbox_symbols(query)Searches for symbols matching the query string across all files in the Sandbox.
Parameters:
queryString -
Returns:
Array\<DaytonaToolboxApiClient:LspSymbol]
start()
def start()Starts the language server. This method must be called before using any other LSP functionality. It initializes the language server for the specified language and project.
Returns:
void
stop()
def stop()Stops the language server. This method should be called when the LSP server is no longer needed to free up system resources.
Returns:
void