@codingame/monaco-languageclient-react
v10.0.0
Published
Monaco Editor React component
Downloads
784
Keywords
Readme
@codingame/monaco-languageclient-react ·
Installation
npm install @codingame/monaco-languageclient-react
Usage
Simple usage
You need to create an infrastructure
object and render the LanguageClient
component:
import React from "react";
import LanguageClient, { Infrastructure } from "@codingame/monaco-languageclient-react";
class MyInfrastructure implements Infrastructure {
automaticTextDocumentUpdate = false
rootUri = 'file://...'
useMutualizedProxy() { return false }
getFileContent(resource, languageClient) { return ... }
openConnection(id) {
// create connection
}
}
const infrastructure = new MyInfrastructure()
function LanguageClientContainer() {
return (
<LanguageClient
id='java'
infrastructure={infrastructure}
/>
);
}