diff options
author | David Peter <sharkdp@users.noreply.github.com> | 2020-10-30 19:36:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 19:36:27 +0100 |
commit | 3a612f063eb157a35b4d09d4dcf2b04ed1604388 (patch) | |
tree | a1128b792bde1ea9051e6e60c9efc555f6755ea6 /assets | |
parent | 9daea73bbab6e3f4ad6761bcf9702cc7a9811489 (diff) | |
parent | 8e8131590ca9922c996c33ad7a5076f57a619e42 (diff) |
Merge branch 'master' into master
Diffstat (limited to 'assets')
-rw-r--r-- | assets/syntaxes/02_Extra/Manpage.sublime-syntax | 22 | ||||
m--------- | assets/syntaxes/02_Extra/Svelte | 0 | ||||
-rw-r--r-- | assets/syntaxes/02_Extra/syntax_test_man.man | 32 | ||||
-rw-r--r-- | assets/themes.bin | bin | 16672 -> 18538 bytes | |||
m--------- | assets/themes/Coldark | 0 |
5 files changed, 45 insertions, 9 deletions
diff --git a/assets/syntaxes/02_Extra/Manpage.sublime-syntax b/assets/syntaxes/02_Extra/Manpage.sublime-syntax index ea0bcb3c..d92eea22 100644 --- a/assets/syntaxes/02_Extra/Manpage.sublime-syntax +++ b/assets/syntaxes/02_Extra/Manpage.sublime-syntax @@ -34,11 +34,11 @@ contexts: scope: markup.heading.title.man - match: \s\s pop: true - - match: '(?=\S)' + - match: '(?=\S|$)' pop: true - match: '$' - push: body + set: body body: # English, ..., ..., ..., Russian, ... @@ -48,14 +48,16 @@ contexts: embed: synopsis escape: '(?={{section_heading}})' + - match: '^(?:USAGE)' + scope: markup.heading.synopsis.man + embed: synopsis + escape: '(?={{section_heading}})' - match: '{{section_heading}}' scope: markup.heading.other.man embed: options # some man pages put command line options under the description heading escape: '(?={{section_heading}})' - - include: function-call - function-call: - match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))' captures: @@ -83,6 +85,7 @@ contexts: - match: '' pop: true - include: function-call + - include: c-code expect-command-line-option: - match: '[A-Za-z0-9-]+' @@ -127,9 +130,15 @@ contexts: - match: '$|(?=[],]|{{command_line_option}})' pop: true + c-code: + - match: '^(?=\s+(?:#include\b|#define\b|/\*|struct\s+(\w+\s*)?\{))' + embed: scope:source.c + #embed_scope: source.c.embedded.man + #escape: ^(?!#|\1|\s*(?:$|/\*|#include\b|#define\b)) + escape: ^(?=\s*(?:\(.*\.\)\s*$|[A-Z](?![A-Z]))) + synopsis: - - match: '^(?=\s+(?:#include|/\*))' - push: scope:source.c + - include: c-code - match: \[ scope: punctuation.section.brackets.begin.man push: command-line-option-or-pipe @@ -140,6 +149,7 @@ contexts: captures: 1: keyword.operator.logical.man #- match: (?={{command_line_option}}) + - match: \w+-\w+ - match: (?=-) push: - match: (?=\s*\|) diff --git a/assets/syntaxes/02_Extra/Svelte b/assets/syntaxes/02_Extra/Svelte new file mode 160000 +Subproject bf92f5b7b69c8ea641d6822fd6d12cc2d934195 diff --git a/assets/syntaxes/02_Extra/syntax_test_man.man b/assets/syntaxes/02_Extra/syntax_test_man.man index a4c8f91d..ee8bada3 100644 --- a/assets/syntaxes/02_Extra/syntax_test_man.man +++ b/assets/syntaxes/02_Extra/syntax_test_man.man @@ -5,7 +5,7 @@ SOMETHING(8) System Manager's Manual SOMETHING(8) # ^^^^^^^ meta.preprocessor NAME -#^^^ markup.heading.title +#^^^ markup.heading.other example - do something useful SYNOPSIS @@ -45,9 +45,16 @@ SYNOPSIS [--quiet] [--debug] [--help|-h] [--version] [--conf FILE] /* According to POSIX.1-2001, POSIX.1-2008 */ -# ^^ source comment.block punctuation.definition.comment +# ^^ source.c comment.block punctuation.definition.comment #include <sys/select.h> -# ^^^^^^^^ source meta.preprocessor.include keyword.control.import.include +# ^^^^^^^^ source.c meta.preprocessor.include keyword.control.import.include + struct timeval { +# ^^^^^^ source.c storage.type + + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ + }; + DESCRIPTION @@ -123,3 +130,22 @@ OPTIONS # ^^^ variable.parameter # ^^ - variable output NUM (default 3) lines of copied context + +EXAMPLE + #include <stdio.h> +# ^^^^^^^^ source.c meta.preprocessor.include keyword.control.import.include + + (This is not C code.) +# ^^^^^^^^^^^^^^^^^^^^^^ - source.c + + struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ + }; +# ^ source.c punctuation.terminator + + The corresponding argument for pselect() has the following type: +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - source.c + #define POLLIN_SET (EPOLLRDNORM | EPOLLRDBAND | EPOLLIN | + EPOLLHUP | EPOLLERR) +# ^ source.c meta.preprocessor.macro meta.group punctuation.section.group.end diff --git a/assets/themes.bin b/assets/themes.bin Binary files differindex b8683424..bc291724 100644 --- a/assets/themes.bin +++ b/assets/themes.bin diff --git a/assets/themes/Coldark b/assets/themes/Coldark new file mode 160000 +Subproject b4a1c74d8d5bdd136ec530e5905b81027247254 |