diff --git a/frontend/src/pages/Compose.vue b/frontend/src/pages/Compose.vue index 41834bf8..0777542a 100644 --- a/frontend/src/pages/Compose.vue +++ b/frontend/src/pages/Compose.vue @@ -221,15 +221,6 @@ - - @@ -250,9 +241,9 @@ import CodeMirror from "vue-codemirror6"; import { yaml } from "@codemirror/lang-yaml"; import { python } from "@codemirror/lang-python"; import { dracula as editorTheme } from "thememirror"; -import { lineNumbers, EditorView } from "@codemirror/view"; +import { lineNumbers, EditorView, Decoration, ViewPlugin } from "@codemirror/view"; import { parseDocument, Document } from "yaml"; - +import { RangeSetBuilder } from "@codemirror/state"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { COMBINED_TERMINAL_COLS, @@ -282,12 +273,44 @@ let yamlErrorTimeout = null; let serviceStatusTimeout = null; let dockerStatsTimeout = null; -let prismjsSymbolDefinition = { - "symbol": { - pattern: /(? v.decorations +}); + export default { components: { NetworkInput, @@ -312,6 +335,7 @@ export default { const extensions = [ editorTheme, yaml(), + variableHighlight, lineNumbers(), EditorView.focusChangeEffect.of(focusEffectHandler) ]; @@ -319,11 +343,13 @@ export default { const extensionsEnv = [ editorTheme, python(), + variableHighlight, lineNumbers(), EditorView.focusChangeEffect.of(focusEffectHandler) ]; - return { extensions, + return { + extensions, extensionsEnv, editorFocus }; }, @@ -778,7 +804,7 @@ export default { }, checkYAML() { - + // TODO: implement validation }, addContainer() { @@ -858,6 +884,11 @@ export default { height: 200px; } +:deep(.cm-variable-highlight) { + color: #fe6000; + font-weight: 600; +} + .editor-box { font-family: 'JetBrains Mono', monospace; font-size: 14px;