Skip to content

React Monaco Editor x Kotlin Language Server (websockets) showcase

Notifications You must be signed in to change notification settings

yahorbarkouski/kotlin-monaco-language-server

Repository files navigation

React Monaco Editor x Kotlin Language Server (websockets) showcase

This is a sample project that demonstrates how to use React Monaco Editor with Kotlin Language Server via websocket connection.

showcase.mp4

Quick Start

npm i # install dependencies for both server and client
npm run start:server # run websocket server to communicate with Kotlin Language Server
npm run dev # run React app

How it works

Websocket server creates a websocket connection between React app and Kotlin Language Server executable, converting json-rpc messages to websocket messages and vice versa. Worth mentioning that monaco editor doesn't support language clients out of the box, so this library is using monaco-languageclient lib to cover this case painlessly.

Notes

For simplicity, Kotlin Language Server executables has been git-tracked in this repository. You may also build and use the latest version from here.