Add GenericConfig and VimL syntaxes

Fix #51
This commit is contained in:
Vincent Prouillet 2017-05-01 14:44:02 +09:00
parent 968f81be29
commit 70729c9822
7 changed files with 99 additions and 0 deletions

6
.gitmodules vendored
View file

@ -25,3 +25,9 @@
[submodule "sublime_syntaxes/SublimeTextLinkerSyntax"] [submodule "sublime_syntaxes/SublimeTextLinkerSyntax"]
path = sublime_syntaxes/SublimeTextLinkerSyntax path = sublime_syntaxes/SublimeTextLinkerSyntax
url = https://github.com/jbw3/SublimeTextLinkerSyntax.git 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

View file

@ -4,6 +4,7 @@
- Fix XML templates overriding and reloading - Fix XML templates overriding and reloading
- `title` and `description` are now optional in the front matter - `title` and `description` are now optional in the front matter
- Add GenericConfig, Vim syntax
## 0.0.4 (2017-04-23) ## 0.0.4 (2017-04-23)

@ -0,0 +1 @@
Subproject commit 5f12fdaae34303ab2550394a14599ad0885b26ec

@ -0,0 +1 @@
Subproject commit b453aff6f783769b6b895986da605a2db0db7379

View file

@ -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

Binary file not shown.

Binary file not shown.