diff --git a/.gitmodules b/.gitmodules index d4e9b97..e7ce67b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,9 @@ [submodule "sublime_syntaxes/SublimeTextLinkerSyntax"] path = sublime_syntaxes/SublimeTextLinkerSyntax url = https://github.com/jbw3/SublimeTextLinkerSyntax.git +[submodule "sublime_syntaxes/Sublime-GenericConfig"] + path = sublime_syntaxes/Sublime-GenericConfig + url = https://github.com/skozlovf/Sublime-GenericConfig.git +[submodule "sublime_syntaxes/Sublime-VimL"] + path = sublime_syntaxes/Sublime-VimL + url = https://github.com/SalGnt/Sublime-VimL.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 4253ca0..f677c72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix XML templates overriding and reloading - `title` and `description` are now optional in the front matter +- Add GenericConfig, Vim syntax ## 0.0.4 (2017-04-23) diff --git a/sublime_syntaxes/Sublime-GenericConfig b/sublime_syntaxes/Sublime-GenericConfig new file mode 160000 index 0000000..5f12fda --- /dev/null +++ b/sublime_syntaxes/Sublime-GenericConfig @@ -0,0 +1 @@ +Subproject commit 5f12fdaae34303ab2550394a14599ad0885b26ec diff --git a/sublime_syntaxes/Sublime-VimL b/sublime_syntaxes/Sublime-VimL new file mode 160000 index 0000000..b453aff --- /dev/null +++ b/sublime_syntaxes/Sublime-VimL @@ -0,0 +1 @@ +Subproject commit b453aff6f783769b6b895986da605a2db0db7379 diff --git a/sublime_syntaxes/VimL.sublime-syntax b/sublime_syntaxes/VimL.sublime-syntax new file mode 100644 index 0000000..c41c039 --- /dev/null +++ b/sublime_syntaxes/VimL.sublime-syntax @@ -0,0 +1,90 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: VimL +file_extensions: + - vim +scope: source.viml +contexts: + main: + - include: comment + - include: string_quoted_double + - include: string_quoted_single + - include: string_regex + - include: inline_comment + - include: number_int + - include: number_hex + - include: keyword + - include: support_function + - include: support_variable + - include: support_type + - include: function_params + - include: function_definition + - include: function_call + - include: function + - include: variable + - include: expr + comment: + - match: ^\s*".*$ + scope: comment.line.quotes.viml + captures: + 1: punctuation.definition.comment.vim + expr: + - match: (\|\||&&|==(\?|#)?|(!|>|<)=(#|\?)?|(=|!)~(#|\?)?|(>|<)(#|\?)is|isnot|\.|\*|\\|%) + scope: storage.function.viml + function: + - match: \b(fu(n|nction)?|end(f|fu|fun|function)?)\b + scope: storage.function.viml + function_call: + - match: '(([sgbwtl]|)?:?[0-9a-zA-Z_#]+)(?=\()' + scope: support.function.any-method + function_definition: + - match: '^\s*(function)\s*!?\s+(?=(s:)?[0-9a-zA-Z_#]+\s*\()' + captures: + 1: storage.function.viml + push: + - meta_scope: meta.function.viml + - match: (\() + captures: + 1: punctuation.definition.parameters.begin.viml + pop: true + - match: "(s:)?[0-9a-zA-Z_#]+" + scope: entity.name.function.viml + function_params: + - match: '-\w+=' + scope: support.type.viml + inline_comment: + - match: '(?!\$)(")(?!\{).*$\n?' + scope: comment.line.quotes.viml + captures: + 1: punctuation.definition.comment.vim + keyword: + - match: \b(if|while|for|try|return|throw|end(if|for|while|try)?|au(g|group)|else(if|)?|do|in|catch|finally|:)\b + scope: keyword.control.viml + number_hex: + - match: "#[0-9a-f]{6}" + scope: constant.numeric.hex + number_int: + - match: '-?\d+' + scope: constant.numeric.integer + string_quoted_double: + - match: '"(\\\\|\\"|\n[^\S\n]*\\|[^\n"])*"' + scope: string.quoted.double.viml + string_quoted_single: + - match: '''(''''|\n[^\S\n]*\\|[^\n''])*''' + scope: string.quoted.single.viml + string_regex: + - match: '/(\\\\|\\/|\n[^\S\n]*\\|[^\n/])*/' + scope: string.regexp.viml + support_function: + - match: \b(set(local|global)?|let|command|filetype|colorscheme|\w*map|\w*a(b|brev)?|syn|exe(c|cute)?|ec(ho|)?|au(tocmd|)?)\b + scope: support.function.viml + support_type: + - match: <.*?> + scope: support.type.viml + support_variable: + - match: '\b(am(enu|)?|(hl|inc)?search|[Bb]uf([Nn]ew[Ff]ile|[Rr]ead)?|[Ff]ile[Tt]ype)\b' + scope: support.variable.viml + variable: + - match: '([sSgGbBwWlLaAvV]:|@|$|&(?!&))\w*' + scope: variable.other.viml diff --git a/sublime_syntaxes/newlines.packdump b/sublime_syntaxes/newlines.packdump index 8e76694..2d1b77e 100644 Binary files a/sublime_syntaxes/newlines.packdump and b/sublime_syntaxes/newlines.packdump differ diff --git a/sublime_syntaxes/nonewlines.packdump b/sublime_syntaxes/nonewlines.packdump index 4289970..a494424 100644 Binary files a/sublime_syntaxes/nonewlines.packdump and b/sublime_syntaxes/nonewlines.packdump differ