From 4e5aec122fd57c6ee57840c52c53346ba2c44fd7 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Tue, 29 Aug 2023 18:10:48 +0530 Subject: [PATCH] Basic highlighting for fscript functions --- src/syntaxes/ftd.tmLanguage.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/syntaxes/ftd.tmLanguage.json b/src/syntaxes/ftd.tmLanguage.json index bbcf8eb..557c459 100644 --- a/src/syntaxes/ftd.tmLanguage.json +++ b/src/syntaxes/ftd.tmLanguage.json @@ -22,12 +22,22 @@ }, { "name": "entity.name.function", - "match": "^(--\\s*)([\\w$\\-_. ]+)(?=\\s*:\\s)", + "match": "^(--\\s*)([\\w$\\-_. ]+)\\s([\\w$\\-_. ]+)\\(([^):]*)\\)(?:)", "captures": { "1": { "name": "punctuation.definition.section.start.ftd" }, - "2": { "name": "entity.name.function" } + "2": { "name": "keyword.operator" }, + "3": { "name": "entity.name.function" }, + "4": { "name": "variable.parameter.ftd" } } }, + { + "name": "entity.name.section", + "match": "^(--\\s*)([\\w$\\-_. ]+)(?=\\s*:\\s)", + "captures": { + "0": { "name": "entity.name.function" }, + "1": { "name": "punctuation.definition.section.start.ftd" } + } + }, { "name": "entity.section.end.ftd", "match": "(--\\s*)(end:)\\s*((?:\\w+[\\-\\.\\w]*)+)",