@montymxb when I reviewed the tutorial update I realized that the terminology around classic editor and vscode-api is not properly defined here. This PR should cleans this up; in the code and the documentation.
monaco-vscode-api is the foundation for everything here and therefore using something like vscodApi for one of the editor config/modes is misleading. This PR corrects this:
classic: Configure monaco-editor as you would when using it directly
Extended: Configure monaco-editor like a VSCode extension
In case of extended mode it is ensured textmate and theme services, plus the default themes are available when you use it.
userConfiguration is now only available in this mode as the regular editorOptions should be used in *classic mode.
I spent some time cleaning EditorAppBase no longer depending on any code from extending classes. This is now cleaner. Sorry this PR grew a lot bigger than initially intended, but it helps if code and description are in-line.
This change will also make the Langium web template config easier as it removes the need for separate bundles, because everything required is configured on this level already. The latest commit there use the next version now.
The latest commit moves editorOptions, diffEditorOptions and overrideAutomaticLayout to EditorAppConfigBase. This allows to set editor parameters directly which may help overcome monaco-editor related configuration problems and wasn't present in extended mode before.
@montymxb when I reviewed the tutorial update I realized that the terminology around classic editor and vscode-api is not properly defined here. This PR should cleans this up; in the code and the documentation.
monaco-vscode-api
is the foundation for everything here and therefore using something like vscodApi for one of the editor config/modes is misleading. This PR corrects this:monaco-editor
as you would when using it directlymonaco-editor
like a VSCode extensionIn case of extended mode it is ensured textmate and theme services, plus the default themes are available when you use it.
userConfiguration
is now only available in this mode as the regular editorOptions should be used in *classic mode.I spent some time cleaning
EditorAppBase
no longer depending on any code from extending classes. This is now cleaner. Sorry this PR grew a lot bigger than initially intended, but it helps if code and description are in-line.next release are available for testing: https://www.npmjs.com/package/monaco-editor-wrapper/v/3.3.0-next.2 https://www.npmjs.com/package/@typefox/monaco-editor-react/v/2.3.0-next.2
This change will also make the Langium web template config easier as it removes the need for separate bundles, because everything required is configured on this level already. The latest commit there use the next version now.
The latest commit moves
editorOptions
,diffEditorOptions
andoverrideAutomaticLayout
toEditorAppConfigBase
. This allows to set editor parameters directly which may help overcome monaco-editor related configuration problems and wasn't present inextended
mode before.