Search in sources :

Example 1 with ServerInfo

use of org.eclipse.lsp4j.ServerInfo in project OberonEmulator by schierlm.

the class Server method initialize.

@Override
public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
    ServerCapabilities cap = new ServerCapabilities();
    fillCapabilities(cap, params);
    ServerInfo si = new ServerInfo("Oberon Language Server", "0.1");
    InitializeResult ir = new InitializeResult(cap, si);
    return CompletableFuture.completedFuture(ir);
}
Also used : InitializeResult(org.eclipse.lsp4j.InitializeResult) ServerInfo(org.eclipse.lsp4j.ServerInfo) ServerCapabilities(org.eclipse.lsp4j.ServerCapabilities)

Example 2 with ServerInfo

use of org.eclipse.lsp4j.ServerInfo in project kolmafia by kolmafia.

the class AshLanguageServer method initialize.

@Override
public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
    this.clientCapabilities = params.getCapabilities();
    this.executor.execute(this.monitor::scan);
    return CompletableFuture.supplyAsync(() -> {
        final ServerCapabilities capabilities = new ServerCapabilities();
        this.textDocumentService.setCapabilities(capabilities);
        this.workspaceService.setCapabilities(capabilities);
        final ServerInfo info = new ServerInfo(StaticEntity.getVersion());
        return new InitializeResult(capabilities, info);
    }, this.executor);
}
Also used : InitializeResult(org.eclipse.lsp4j.InitializeResult) ServerInfo(org.eclipse.lsp4j.ServerInfo) ServerCapabilities(org.eclipse.lsp4j.ServerCapabilities)

Aggregations

InitializeResult (org.eclipse.lsp4j.InitializeResult)2 ServerCapabilities (org.eclipse.lsp4j.ServerCapabilities)2 ServerInfo (org.eclipse.lsp4j.ServerInfo)2