Skip to content

Instantly share code, notes, and snippets.

View NipunaMarcus's full-sized avatar

Nipuna Marcus NipunaMarcus

  • WSO2 Lanka
  • Colombo, Sri Lanka
View GitHub Profile
import ballerinax/googleapis_calendar;
import ballerina/websub;
import ballerina/config;
listener websub:Listener googleListener = new websub:Listener(8090);
googleapis_calendar:CalendarConfiguration calendarConfig = {
oauth2Config: {
accessToken: config:getAsString("ACCESS_TOKEN_8865F580_41C3_11EB_B4DB_4EF73BA5BFA5"),
refreshConfig: {
import ballerina/config;
import ballerina/http;
import ballerina/oauth2;
import ballerina/websub;
import ballerinax/github.webhook as webhook;
oauth2:OutboundOAuth2Provider githubOAuth2Provider = new ({
accessToken: config:getAsString("ACCESS_TOKEN_8E422A19_433C_11EB_8E5C_72315290F677")
});
@NipunaMarcus
NipunaMarcus / helloFalks->src->extension.ts
Created January 10, 2020 03:38
helloFalks extension code
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as path from 'path';
import * as vscode from 'vscode';
// Import the language client, language client options and server options from VSCode language client.
import org.hello.ls.langserver.HelloLanguageServer;
import org.eclipse.lsp4j.jsonrpc.Launcher;
import org.eclipse.lsp4j.launch.LSPLauncher;
import org.eclipse.lsp4j.services.LanguageClient;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.logging.Level;
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>hellols-parent</artifactId>
<groupId>org.hello.ls</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
package org.hello.ls.langserver;
import org.eclipse.lsp4j.*;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.eclipse.lsp4j.services.TextDocumentService;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
package org.hello.ls.langserver;
import org.eclipse.lsp4j.CompletionOptions;
import org.eclipse.lsp4j.InitializeParams;
import org.eclipse.lsp4j.InitializeResult;
import org.eclipse.lsp4j.ServerCapabilities;
import org.eclipse.lsp4j.TextDocumentSyncKind;
import org.eclipse.lsp4j.services.LanguageClient;
import org.eclipse.lsp4j.services.LanguageClientAware;
import org.eclipse.lsp4j.services.LanguageServer;
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>org.hello.ls</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>hellols-parent</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>