mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-12 16:04:39 +08:00
Tiny tokenizer improvements
This commit is contained in:
parent
541a3e2529
commit
48c7f9e707
2 changed files with 10 additions and 2 deletions
|
@ -192,7 +192,15 @@ const ElixirMonarchLanguage = {
|
||||||
[
|
[
|
||||||
// In-scope call - an identifier followed by ( or .(
|
// In-scope call - an identifier followed by ( or .(
|
||||||
/(@variableName)(?=\s*\.?\s*\()/,
|
/(@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
|
// Referencing function in a module
|
||||||
|
|
|
@ -25,7 +25,7 @@ monaco.editor.defineTheme("custom", {
|
||||||
inherit: false,
|
inherit: false,
|
||||||
rules: [
|
rules: [
|
||||||
{ token: "", foreground: "#abb2bf" },
|
{ token: "", foreground: "#abb2bf" },
|
||||||
{ token: "variable", foreground: "#abb2bf" },
|
{ token: "variable", foreground: "#e06c75" },
|
||||||
{ token: "constant", foreground: "#61afef" },
|
{ token: "constant", foreground: "#61afef" },
|
||||||
{ token: "constant.character.escape", foreground: "#61afef" },
|
{ token: "constant.character.escape", foreground: "#61afef" },
|
||||||
{ token: "comment", foreground: "#5c6370" },
|
{ token: "comment", foreground: "#5c6370" },
|
||||||
|
|
Loading…
Add table
Reference in a new issue