diff --git a/syntaxes/just.tmLanguage.json b/syntaxes/just.tmLanguage.json index f61534b..bf27c6b 100644 --- a/syntaxes/just.tmLanguage.json +++ b/syntaxes/just.tmLanguage.json @@ -647,8 +647,13 @@ "patterns": [ { "comment": "JavaScript", - "begin": "^\\s+#!/usr/bin/env\\s+node.*$", + "begin": "^\\s+(#!/usr/bin/env\\s+node.*)$", "end": "^$", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.shebang.just" + } + }, "contentName": "source.js", "patterns": [ { @@ -658,8 +663,13 @@ }, { "comment": "Perl", - "begin": "^\\s+#!/usr/bin/env\\s+perl.*$", + "begin": "^\\s+(#!/usr/bin/env\\s+perl.*)$", "end": "^$", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.shebang.just" + } + }, "contentName": "source.perl", "patterns": [ { @@ -669,8 +679,13 @@ }, { "comment": "Python", - "begin": "^\\s+#!/usr/bin/env\\s+python.*$", + "begin": "^\\s+(#!/usr/bin/env\\s+python.*)$", "end": "^$", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.shebang.just" + } + }, "contentName": "source.python", "patterns": [ { @@ -680,8 +695,13 @@ }, { "comment": "Ruby", - "begin": "^\\s+#!/usr/bin/env\\s+ruby.*$", + "begin": "^\\s+(#!/usr/bin/env\\s+ruby.*)$", "end": "^$", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.shebang.just" + } + }, "contentName": "source.ruby", "patterns": [ { @@ -691,8 +711,13 @@ }, { "comment": "Shell", - "begin": "^\\s+#!/usr/bin/env\\s+(sh|bash|zsh|fish).*$", + "begin": "^\\s+(#!/usr/bin/env\\s+(?:sh|bash|zsh|fish).*)$", "end": "^$", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.shebang.just" + } + }, "contentName": "source.shell", "patterns": [ { diff --git a/syntaxes/just.tmLanguage.yml b/syntaxes/just.tmLanguage.yml index 57079ae..216d56f 100644 --- a/syntaxes/just.tmLanguage.yml +++ b/syntaxes/just.tmLanguage.yml @@ -478,32 +478,47 @@ repository: embedded-languages: patterns: - comment: JavaScript - begin: "^\\s+#!/usr/bin/env\\s+node.*$" + begin: "^\\s+(#!/usr/bin/env\\s+node.*)$" end: ^$ + beginCaptures: + '1': + name: comment.line.number-sign.shebang.just contentName: source.js patterns: - include: source.js - comment: Perl - begin: "^\\s+#!/usr/bin/env\\s+perl.*$" + begin: "^\\s+(#!/usr/bin/env\\s+perl.*)$" end: ^$ + beginCaptures: + '1': + name: comment.line.number-sign.shebang.just contentName: source.perl patterns: - include: source.perl - comment: Python - begin: "^\\s+#!/usr/bin/env\\s+python.*$" + begin: "^\\s+(#!/usr/bin/env\\s+python.*)$" end: ^$ + beginCaptures: + '1': + name: comment.line.number-sign.shebang.just contentName: source.python patterns: - include: source.python - comment: Ruby - begin: "^\\s+#!/usr/bin/env\\s+ruby.*$" + begin: "^\\s+(#!/usr/bin/env\\s+ruby.*)$" end: ^$ + beginCaptures: + '1': + name: comment.line.number-sign.shebang.just contentName: source.ruby patterns: - include: source.ruby - comment: Shell - begin: "^\\s+#!/usr/bin/env\\s+(sh|bash|zsh|fish).*$" + begin: "^\\s+(#!/usr/bin/env\\s+(?:sh|bash|zsh|fish).*)$" end: ^$ + beginCaptures: + '1': + name: comment.line.number-sign.shebang.just contentName: source.shell patterns: - include: source.shell diff --git a/syntaxes/scopes b/syntaxes/scopes index 4094330..7543dc6 100644 --- a/syntaxes/scopes +++ b/syntaxes/scopes @@ -1 +1 @@ -["comment.line.number-sign.just","constant.character.escape.just","constant.character.expanded.just","constant.language.boolean.just","constant.language.hex.just","constant.numeric.just","entity.name.function.just","invalid.illegal.name.just","keyword.control.conditional.just","keyword.operator.and.just","keyword.operator.assignment.just","keyword.operator.attribute.end.just","keyword.operator.concat.just","keyword.operator.default.just","keyword.operator.equality.just","keyword.operator.error-suppression.just","keyword.operator.path-join.just","keyword.operator.quiet.just","keyword.operator.recipe.end.just","keyword.other.recipe.prefix.just","keyword.other.recipe.variadic.just","keyword.other.reserved.just","punctuation.optional.just","string.interpolated.escape.just","string.interpolated.escaping.just","string.interpolated.just","string.quoted.double.indented.just","string.quoted.double.just","string.quoted.single.indented.just","string.quoted.single.just","support.function.builtin.just","support.function.system.just","variable.name.alias.just","variable.name.module.just","variable.other.just","variable.parameter.recipe.just"] \ No newline at end of file +["comment.line.number-sign.just","comment.line.number-sign.shebang.just","constant.character.escape.just","constant.character.expanded.just","constant.language.boolean.just","constant.language.hex.just","constant.numeric.just","entity.name.function.just","invalid.illegal.name.just","keyword.control.conditional.just","keyword.operator.and.just","keyword.operator.assignment.just","keyword.operator.attribute.end.just","keyword.operator.concat.just","keyword.operator.default.just","keyword.operator.equality.just","keyword.operator.error-suppression.just","keyword.operator.path-join.just","keyword.operator.quiet.just","keyword.operator.recipe.end.just","keyword.other.recipe.prefix.just","keyword.other.recipe.variadic.just","keyword.other.reserved.just","punctuation.optional.just","string.interpolated.escape.just","string.interpolated.escaping.just","string.interpolated.just","string.quoted.double.indented.just","string.quoted.double.just","string.quoted.single.indented.just","string.quoted.single.just","support.function.builtin.just","support.function.system.just","variable.name.alias.just","variable.name.module.just","variable.other.just","variable.parameter.recipe.just"] \ No newline at end of file