-
-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Labels
Description
Various issue regarding problems with the react component came up in the last couple of weeks. Some related to things we did wrong, but others are due to the nature of the involved technologies. "Containing" vscode/monaco-editor inside a react component has limits and those limits are currently not clear to users:
- The API of the wrapper and the react component should be clear regarding the life-cycle
- Generally the life-cycle of the language client should be decoupled from the editor (wrapper, react component)
- When the disposal of the editor happens it usually does not make sense to dispose the language client
- It must be made more clear what is globally initialized and will not change until the page is reloaded and what can be re-initialized / restarted every time.
MonacoLanguageClientWrapper
is basically an independent thing now and it should be moved out of themonaco-editor-wrapper
package into themonaco-languageclient
package (maybe as sub-export).- The specific configuration objects should be moved there as well. The wrapper configuration should be split-up.
- It should be considered to also de-couple
monaco-vscode-api
level init from the wrapper even if it requires to write more code by the end user. But, it doesn't mix global with editor specific code. Currently, this is some sort of hidden magic. - The only thing that should be allowed to fully re-initialized is monco-editor itself. When the workbench of views service mode is used this already alters the way the wrapper can be used (calling
start
is forbidden) - Allow to change the languageclient implementation Does the monaco language client support the inlineCompletion function? #934
I am really thinking about if we should introduce completely new package names for the wrapper and the react component as they are no longer bound to moanco-editor
, but to @codingame/monaco-vscode-api
CGNonofr and asimaranov