The jupyterlab_robotmode was not updated to JupyterLab 4.x and is using the old CodeMirror 5 rather than CodeMirror 6 - do not follow it.
For a recent thread about syntax highlighting see Does JupyterLab language registry's addLanguage support LRLanguage as input?