mirror of
https://github.com/Reuh/sublime-anselme.git
synced 2025-10-27 11:49:30 +00:00
Added § decorator
This commit is contained in:
parent
732ca7f6c5
commit
516e3ea156
3 changed files with 52 additions and 14 deletions
|
|
@ -9,7 +9,7 @@ file_extensions:
|
|||
scope: source.anselme
|
||||
|
||||
variables:
|
||||
identifier: '[^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\%\.\"\d][^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\%\.\"]*'
|
||||
identifier: '[^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\.\#\"\d][^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\.\#\"]*'
|
||||
|
||||
contexts:
|
||||
main:
|
||||
|
|
@ -49,14 +49,28 @@ contexts:
|
|||
push: brace_expression
|
||||
- match: '\\$'
|
||||
scope: keyword.other.anselme
|
||||
- include: decorable
|
||||
- match: '\n'
|
||||
pop: true
|
||||
|
||||
line_expression:
|
||||
- include: expression
|
||||
- include: decorable
|
||||
- match: '\n'
|
||||
pop: true
|
||||
|
||||
decorable:
|
||||
- match: '~'
|
||||
scope: keyword.control.conditional.anselme
|
||||
set: line_expression
|
||||
- match: '#'
|
||||
scope: keyword.other.anselme
|
||||
set: line_expression
|
||||
- match: '\n'
|
||||
pop: true
|
||||
- match: '(§)([^\~\#\§\n]*)'
|
||||
captures:
|
||||
1: keyword.control.anselme
|
||||
2: entity.name.function.anselme
|
||||
set: line_expression
|
||||
|
||||
expression:
|
||||
- meta_scope: meta.group.anselme
|
||||
|
|
@ -83,8 +97,6 @@ contexts:
|
|||
push: parenthesis_expression
|
||||
- match: '{{identifier}}'
|
||||
scope: variable.other.anselme
|
||||
- match: '\n'
|
||||
pop: true
|
||||
|
||||
parenthesis_expression:
|
||||
- include: expression
|
||||
|
|
@ -98,15 +110,6 @@ contexts:
|
|||
scope: keyword.other.anselme
|
||||
pop: true
|
||||
|
||||
line_expression:
|
||||
- include: expression
|
||||
- match: '~'
|
||||
scope: keyword.control.conditional.anselme
|
||||
set: line_expression
|
||||
- match: '#'
|
||||
scope: keyword.other.anselme
|
||||
set: line_expression
|
||||
|
||||
string:
|
||||
- meta_scope: string.quoted.double
|
||||
- match: \"
|
||||
|
|
|
|||
21
Comments.tmPreferences
Normal file
21
Comments.tmPreferences
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>source.anselme</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string>(</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
14
Indent.tmPreferences
Normal file
14
Indent.tmPreferences
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Indent</string>
|
||||
<key>scope</key>
|
||||
<string>source.anselme</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>increaseIndentPattern</key>
|
||||
<string>^\s*[§>~#]</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Loading…
Add table
Add a link
Reference in a new issue