From d2c78eca233811c7b1070d3c2c5c14ab370214bb Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Thu, 29 Aug 2024 13:59:09 +0200 Subject: [PATCH] Use Elm CodeMirror syntax highlighting for Roc (#7047) --- .../components/misc/CodeMirror/languageCompartment.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/components/misc/CodeMirror/languageCompartment.ts b/app/javascript/components/misc/CodeMirror/languageCompartment.ts index 65a5a0a030..0e7e907504 100644 --- a/app/javascript/components/misc/CodeMirror/languageCompartment.ts +++ b/app/javascript/components/misc/CodeMirror/languageCompartment.ts @@ -209,6 +209,10 @@ export const loadLanguageCompartment = async ( const { r } = await import('@codemirror/legacy-modes/mode/r') return compartment.of(StreamLanguage.define(r)) } + case 'roc': { + const { elm } = await import('@codemirror/legacy-modes/mode/elm') + return compartment.of(StreamLanguage.define(elm)) + } case 'ruby': { const { ruby } = await import('@codemirror/legacy-modes/mode/ruby') return compartment.of(StreamLanguage.define(ruby))