This is based on monaco-languageclient6.0.0, monaco-vscode-api1.78.5 and monaco-editor, 0.37.1
Noteworthy items:
Configuration is no longer "property" based. It is now achieved with one config large object:
Web component monaco-editor-comp has been removed/is discontinued, which was blocking this approach
Langium examples for the wrapper and the react component share the same config object
The underlying monaco-editor can be configured in two ways now (wrapperConfig):
Classical (as we did before, but with one config object)
Extension like (using the extension based mechanism supplied by monaco-vscode-api)
monaco-languageclient no longer exposes its own service. Now, we fully rely on services supplied by monco-vscode-api.
This means even if you decide to configure monaco-editor the classical way (see above), you still require some basic services. This configuration is made inside MonacoEditorLanguageClientWrapper. Potential serviceConfig supplied when using vscode-api extension config is taken into account and combined then.
The react component is fully working again:
The re-configuration code needs to be tested in real world projects (not done, yet)
Re-configuration without full editorrestart:
Updating the text model(s) is possible
Updating the monaco-editor options is possible
Restarting the languageclient is possible independently
This is based on
monaco-languageclient
6.0.0
,monaco-vscode-api
1.78.5
andmonaco-editor
,0.37.1
Noteworthy items:
monaco-editor-comp
has been removed/is discontinued, which was blocking this approachwrapperConfig
):monaco-vscode-api
)monaco-languageclient
no longer exposes its own service. Now, we fully rely on services supplied bymonco-vscode-api
.monaco-editor
the classical way (see above), you still require some basic services. This configuration is made insideMonacoEditorLanguageClientWrapper
. PotentialserviceConfig
supplied when using vscode-api extension config is taken into account and combined then.Current pre-releases:
TODO:
Weak spots: