diff --git a/assets/js/cell/live_editor/elixir/monarch_language.js b/assets/js/cell/live_editor/elixir/monarch_language.js index 56f32ae27..22943596b 100644 --- a/assets/js/cell/live_editor/elixir/monarch_language.js +++ b/assets/js/cell/live_editor/elixir/monarch_language.js @@ -192,7 +192,15 @@ const ElixirMonarchLanguage = { [ // In-scope call - an identifier followed by ( or .( /(@variableName)(?=\s*\.?\s*\()/, - ["function.call"], + { + cases: { + // Tokenize as keyword in cases like `if(..., do: ..., else: ...)` + "@declarationKeywords": "keyword.declaration", + "@namespaceKeywords": "keyword", + "@otherKeywords": "keyword", + "@default": "function.call" + } + }, ], [ // Referencing function in a module diff --git a/assets/js/cell/live_editor/monaco.js b/assets/js/cell/live_editor/monaco.js index 8f3d3a1ac..9debf2b71 100644 --- a/assets/js/cell/live_editor/monaco.js +++ b/assets/js/cell/live_editor/monaco.js @@ -25,7 +25,7 @@ monaco.editor.defineTheme("custom", { inherit: false, rules: [ { token: "", foreground: "#abb2bf" }, - { token: "variable", foreground: "#abb2bf" }, + { token: "variable", foreground: "#e06c75" }, { token: "constant", foreground: "#61afef" }, { token: "constant.character.escape", foreground: "#61afef" }, { token: "comment", foreground: "#5c6370" },