Home Download Buy Blog Forum Support

Trying to add a scope selector to language file

Trying to add a scope selector to language file

Postby handycam on Tue Jan 08, 2013 9:35 pm

I have been using the excellent new "kit language" supported by CodeKit. Basically, there are special comments that are treated as includes in regular HTML files, like

Code: Select all
<!-- @include _header.kit -->


So I'd like to add a scope so I can color these differently from other comments.

I tried copying the code from the ASP tmLanguage file, since it was close, and pasted it into the HTML.tmLanguage file like below, but so far that scope is not showing up in the document with scope hunter:

Code: Select all
<dict>
         <key>begin</key>
         <string>&lt;!-- @</string>
         <key>beginCaptures</key>
         <dict>
            <key>0</key>
            <dict>
               <key>name</key>
               <string>punctuation.section.embedded.begin.asp</string>
            </dict>
         </dict>
         <key>end</key>
         <string>&gt;</string>
         <key>endCaptures</key>
         <dict>
            <key>0</key>
            <dict>
               <key>name</key>
               <string>punctuation.section.embedded.end.asp</string>
            </dict>
         </dict>
         <key>name</key>
         <string>source.asp.embedded.html</string>
         <key>patterns</key>
         <array>
            <dict>
               <key>captures</key>
               <dict>
                  <key>1</key>
                  <dict>
                     <key>name</key>
                     <string>punctuation.definition.comment.asp</string>
                  </dict>
               </dict>
               <key>match</key>
               <string>(').*?(?=%&gt;)</string>
               <key>name</key>
               <string>comment.line.apostrophe.asp</string>
            </dict>
            <dict>
               <key>include</key>
               <string>#embedded-code</string>
            </dict>
         </array>
      </dict>


Since my color scheme already has a color for punctuation.section.embedded.begin.asp etc. I figured this would be simpler.

Anyone ever do this? What am I missing?
Mac OS 10.9.3
ST 3 (3059)
handycam
 
Posts: 271
Joined: Tue Jan 03, 2012 2:42 pm

Return to General Discussion

Who is online

Users browsing this forum: FichteFoll, Yahoo [Bot] and 32 guests