@codingame/monaco-languageclient-react
TypeScript icon, indicating that this package has built-in type declarations

7.0.2 • Public • Published

@codingame/monaco-languageclient-react · monthly downloads npm version PRs welcome

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}
   />
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @codingame/monaco-languageclient-react

Weekly Downloads

144

Version

7.0.2

License

none

Unpacked Size

25.8 kB

Total Files

17

Last publish

Collaborators

  • codingame_team
  • nantoniazzi
  • samuel.olivier
  • maximecg
  • beli4l
  • nonofr