diff --git a/lsp/syntaxes/civet.json b/lsp/syntaxes/civet.json index ab5a65e4..98e139fc 100644 --- a/lsp/syntaxes/civet.json +++ b/lsp/syntaxes/civet.json @@ -166,23 +166,26 @@ } ] }, + { - "name": "meta.import.civet", - "match": "(?:(import)\\s+(type)?\\s*)?(\\{(?:.|\\n)*\\}(?=\\s+from)|\\w+)\\s+(from)\\s+(\\S+)", - "captures": { - "1": { "name": "keyword.control.import.civet" }, - "2": { "name": "keyword.control.type.civet" }, - "3": { - "patterns": [ - {"include": "source.civet"} - ] - }, - "4": { "name": "keyword.control.from.civet" }, - "5": { "name": "string.unquoted.module-reference.civet" } - } + "name": "string.unquoted.module-reference.civet", + "match": "(?<=(^\\s*(import|export)|^)\\s*(type\\s+)?((\\w+\\s*,\\s*)?\\{(.|\\n)*\\}|\\w+|(\\*\\s+as\\s+\\w+))\\s+(from)\\s+)(?=[^()]|$)" + }, + { + "name": "string.unquoted.module-reference.civet", + "match": "(?<=^\\s*from\\s+)\\S+(?=\\s+(import|export)\\s*[^()])" + }, + { + "name": "string.unquoted.module-reference.civet", + "match": "(?<=^\\s*import\\s*)\\S+(?=\\s*$)" + }, + { + "name": "string.unquoted.module-reference.civet", + "match": "(?<=^export\\s+(\\w+\\s*,?\\s*)+\\s+from\\s+)\\S+(?=[^()]|$)" }, + { - "match": "\\b(?