File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed
Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org).
1010------------------------------------------------------------------------
1111* __ Added:__ Highlighting for another 30 keywords used by [ ` mocha.el ` ] [ ]
1212* __ Added:__ Highlighting for the [ ` use-package ` ] [ ] macro
13+ * __ Fixed:__ Highlighting of YASnippets without prologues
1314
1415
1516
Original file line number Diff line number Diff line change @@ -11,21 +11,14 @@ firstLineMatch: """(?xi)
1111 (?=[\\ s;]|(?<![-*])-\\ *-).*?-\\ *-
1212"""
1313
14- patterns : [include : " #main" ]
14+ patterns : [{
15+ name : " meta.prologue.yasnippet"
16+ begin : " \\ A(?=\\ s*(?:$|#))"
17+ end : " (?:^|\\ G)(?=\\ s*(?:[^\\ s#]|#+\\ s*--\\ s*$))"
18+ patterns : [include : " #prologue-lines" ]
19+ }, include : " #body" ]
1520
1621repository :
17- main :
18- patterns : [
19- {include : " #prologue" }
20- {include : " #body" }
21- ]
22-
23- prologue :
24- name : " meta.prologue.yasnippet"
25- begin : " \\ A"
26- end : " ^(?=\\ s*#+\\ s*--\\ s*$)"
27- patterns : [include : " #prologue-lines" ]
28-
2922 " prologue-lines" :
3023 begin : " ^\\ s*(#+)(?!\\ s*--\\ s*$)"
3124 end : " $"
@@ -110,12 +103,12 @@ repository:
110103
111104 body :
112105 name : " meta.snippet-body.yasnippet"
113- begin : " ^\\ s*(#+)\\ s*(--)\\ s*$\\ n?"
106+ begin : " ^\\ s*(( #+)\\ s*(--)\\ s*$\\ n?|(?=[^ \\ s#])) "
114107 end : " (?=A)B"
115108 beginCaptures :
116- 0 : name : " comment.line.number-sign.yasnippet"
117- 1 : name : " punctuation.definition.comment.number-sign.yasnippet"
118- 2 : name : " punctuation.terminator.double-dash.yasnippet"
109+ 1 : name : " comment.line.number-sign.yasnippet"
110+ 2 : name : " punctuation.definition.comment.number-sign.yasnippet"
111+ 3 : name : " punctuation.terminator.double-dash.yasnippet"
119112 patterns : [
120113 {include : " #tab-stops" }
121114 {include : " #indentation-marker" }
You can’t perform that action at this time.
0 commit comments