TypeFox / monaco-components

Monaco Editor and Language Client Wrapper, plus Monaco Editor React Component
MIT License
42 stars 13 forks source link

semantic highlighting works with classic editor #45

Closed kaisalmen closed 11 months ago

kaisalmen commented 1 year ago

The wrapper always uses the configuration service from monaco-vscode-api what basically makes updateUserConfiguration mandatory for configuration updates after start.

In classic mode editorOptions that are editor specific work, but things like semanticHighlighting requires the user configuration update due to the activation of the vscode configuration service. This PR takes the semanticHighlighting from the editorOptions and applies them the the userConfiguration. This prevents to run into the same problem as #32 .

This PR moves userConfiguration to EditorAppBaseConfig which makes it available in both classic mode and vscodeApi mode. It is generally advised to use this mean to configure the app, but we leave the monaco-editor options in for BW-compatibility reasons.

Overall aim to allow monarch + semanticHighlighting is achieved.

kaisalmen commented 11 months ago

Thank you. This is good to go from my side now.

cdietrich commented 11 months ago

@kaisalmen is this already part of 3.1.0-next.0?

kaisalmen commented 11 months ago

@cdietrich yes it is. This PR is in and 47 (status from yesterday) and 48 are in.

cdietrich commented 11 months ago

hmm somehow i still get the same error in my example. need to digg.

problem found: is working now

kaisalmen commented 11 months ago

@cdietrich Superb! Btw, the langium example now allows you to launch the editor in both modes!