Home Download Buy Blog Forum Support

Ada support, various other questions from potential customer

Ada support, various other questions from potential customer

Postby enhorning on Thu Jan 20, 2011 11:36 pm

I've come across SublimeText, and would quite like to migrate all my programming to it, as I like a lot of its features, especially the fantastic multiediting and the ability to write pythong plugins. However, there are some issues that makes me hesitate:

No code folding - not that I use it a lot, but the few times I do, it helps with the overview.

Insufficient and disorganized documentation.

Ada was not one of the languages included, and as syntax highlighting is an important feature, a dealbreaker for me, I looked around and found an ada.tmlanguge file. While this gets me mostly decent highlighting, a few things are missing, and one is outright broken:

  • Operators don't highlight - I strongly prefer them to be highlighted
  • ()Bracket matching is way too subtle - I would prefer actually changing the colour of the brackets to something vivid
  • Is it possible to change the syntax highlighting to bold for e.g. keywords (or any other category I want a different font or font effect for).
  • (This is the really broken bit) : a double quotes character (i.e. between single quotes) messes up all the syntax highlighting - it thinks it is the start of a string, so everything until the next (except the bits which are actual strings) '"' gets highlighted as strings.

I guess there are ways to fix this by poking around in the respective files, but I don't know how to (yet).

Ada.tmlanguage:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>comment</key>
   <string>Ada -- chris@cjack.com. Feel free to modify, distribute, be happy. Share and enjoy.</string>
   <key>fileTypes</key>
   <array>
      <string>adb</string>
      <string>ads</string>
   </array>
   <key>foldingStartMarker</key>
   <string>\b(?i:(procedure|package|function|task|type|loop))\b</string>
   <key>foldingStopMarker</key>
   <string>\b(?i:(end))\b</string>
   <key>keyEquivalent</key>
   <string>^~A</string>
   <key>name</key>
   <string>Ada</string>
   <key>patterns</key>
   <array>
      <dict>
         <key>captures</key>
         <dict>
            <key>1</key>
            <dict>
               <key>name</key>
               <string>storage.type.function.ada</string>
            </dict>
            <key>2</key>
            <dict>
               <key>name</key>
               <string>entity.name.function.ada</string>
            </dict>
         </dict>
         <key>match</key>
         <string>\b(?i:(function|procedure))\b\s+(\w+(\.\w+)?|"(?:\+|-|=|\*|/)")</string>
         <key>name</key>
         <string>meta.function.ada</string>
      </dict>
      <dict>
         <key>captures</key>
         <dict>
            <key>1</key>
            <dict>
               <key>name</key>
               <string>storage.type.package.ada</string>
            </dict>
            <key>2</key>
            <dict>
               <key>name</key>
               <string>keyword.other.body.ada</string>
            </dict>
            <key>3</key>
            <dict>
               <key>name</key>
               <string>entity.name.type.package.ada</string>
            </dict>
         </dict>
         <key>match</key>
         <string>\b(?i:(package)(?:\b\s+(body))?)\b\s+(\w+(\.\w+)?|"(?:\+|-|=|\*|/)")</string>
         <key>name</key>
         <string>meta.function.ada</string>
      </dict>
      <dict>
         <key>captures</key>
         <dict>
            <key>1</key>
            <dict>
               <key>name</key>
               <string>storage.type.function.ada</string>
            </dict>
            <key>2</key>
            <dict>
               <key>name</key>
               <string>entity.name.function.ada</string>
            </dict>
         </dict>
         <key>match</key>
         <string>\b(?i:(end))\b\s+(\w+(\.\w+)?|"(\+|-|=|\*|/)")\s?;</string>
         <key>name</key>
         <string>meta.function.ada</string>
      </dict>
      <dict>
         <key>captures</key>
         <dict>
            <key>1</key>
            <dict>
               <key>name</key>
               <string>keyword.control.import.ada</string>
            </dict>
            <key>2</key>
            <dict>
               <key>name</key>
               <string>string.unquoted.import.ada</string>
            </dict>
         </dict>
         <key>match</key>
         <string>\b(?i:(with|use))\b\s+(\w+(\.\w+)?)\s?;</string>
         <key>name</key>
         <string>meta.function.ada</string>
      </dict>
      <dict>
         <key>match</key>
         <string>\b(?i:(begin|end|package))\b</string>
         <key>name</key>
         <string>keyword.control.ada</string>
      </dict>
      <dict>
         <key>match</key>
         <string>\b(?i:(\=&gt;|abort|else|new|return|abs|elsif|not|reverse|abstract|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|subtype|all|others|and|for|out|tagged|array|function|task|at|terminate|generic|pragma|then|goto|private|type|body|procedure|if|protected|until|case|in|use|constant|is|raise|range|when|declare|limited|record|while|delay|loop|rem|with|delta|renames|digits|mod|requeue|xor|do))\b</string>
         <key>name</key>
         <string>keyword.other.ada</string>
      </dict>
      <dict>
         <key>match</key>
         <string>\b((0(x|X)[0-9a-fA-F_]*)|(([0-9_]+\.?[0-9_]*)|(\.[0-9_]+))((e|E)(\+|-)?[0-9_]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b</string>
         <key>name</key>
         <string>constant.numeric.ada</string>
      </dict>
      <dict>
         <key>begin</key>
         <string>"</string>
         <key>beginCaptures</key>
         <dict>
            <key>0</key>
            <dict>
               <key>name</key>
               <string>punctuation.definition.string.begin.ada</string>
            </dict>
         </dict>
         <key>end</key>
         <string>"</string>
         <key>endCaptures</key>
         <dict>
            <key>0</key>
            <dict>
               <key>name</key>
               <string>punctuation.definition.string.end.ada</string>
            </dict>
         </dict>
         <key>name</key>
         <string>string.quoted.double.ada</string>
         <key>patterns</key>
         <array>
            <dict>
               <key>match</key>
               <string>\n</string>
               <key>name</key>
               <string>invalid.illegal.lf-in-string.ada</string>
            </dict>
         </array>
      </dict>
      <dict>
         <key>captures</key>
         <dict>
            <key>1</key>
            <dict>
               <key>name</key>
               <string>punctuation.definition.comment.ada</string>
            </dict>
         </dict>
         <key>match</key>
         <string>(--)(.*)$\n?</string>
         <key>name</key>
         <string>comment.line.double-dash.ada</string>
      </dict>
   </array>
   <key>scopeName</key>
   <string>source.ada</string>
   <key>uuid</key>
   <string>0AB8A36E-6B1D-11D9-B034-000D93589AF6</string>
</dict>
</plist>
Attachments
Untitled.png
Showing messed up syntax highlighting
Untitled.png (8.91 KiB) Viewed 3043 times
enhorning
 
Posts: 1
Joined: Mon Jan 17, 2011 6:34 pm

Re: Ada support, various other questions from potential customer

Postby guillermooo on Fri Jan 21, 2011 9:26 am

Insufficient and disorganized documentation.


Try sublimetext.info. You'll find some (unofficial) information there not available here. The plan is to add more soon as time permits.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Ada support, various other questions from potential customer

Postby guillermooo on Fri Jan 21, 2011 9:27 am

guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Ada support, various other questions from potential customer

Postby mulander on Tue Nov 15, 2011 7:54 pm

Sorry for digging up an old thread but I wanted to announce that I started to work on improving the available Ada.tmbundle for Sublime and this thread seemed appropriate.

I have no prior experience with creating TextMate/Sublime bundles but I hope to gradually improve the support it currently provides.

The bundle is available on github and is under active development: https://github.com/mulander/ada.tmbundle

Please report any problems/bugs/requests using https://github.com/mulander/ada.tmbundle/issues

Regards


EDIT: Forgot to mention that I fixed the messed up syntax highlighting the original post demonstrates ;)
mulander
 
Posts: 1
Joined: Thu Nov 12, 2009 6:52 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 37 guests