Tmbundle converted with apm causes errors in editor


#1

I’m trying to make a package out of a tmbundle found here: https://github.com/JuliaLang/julia/tree/master/contrib/Julia.tmbundle

After running apm init --package ~/.atom/packages/language-julia --convert ./path/to/julia/contrib/Julia.tmbundle/

I see ~/.atom/packages/language-julia/scoped-properties/language-julia.cson containing:

'.source.julia':
  'editor':
    'commentStart': '# '
    'increaseIndentPattern': '(^\\s*(if|while|for|function|macro|immutable|type|let|else|elseif|quote|try|catch|finally)\\b.*\\s*$)|(^.*\\b(do|begin)\\b\\s*$)'
    'decreaseIndentPattern': '^\\s*((end|else|elseif|catch|finally)\\b)'

and ~/.atom/packages/language-julia/grammers/julia.cson containing:

[
  null
  {
    'fileTypes': [
      'jl'
    ]
    'firstLineMatch': '^#!.*\\bjulia\\s*$'
    'foldingStartMarker': '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$'
    'foldingStopMarker': '^\\s*(?:end)\\b.*$'
    'name': 'Julia'
    'patterns': [
      {
        'include': '#operator'
      }
      {
        'include': '#array'
      }
      {
        'include': '#string'
      }
      {
        'include': '#bracket'
      }
      {
        'include': '#function_decl'
      }
      {
        'include': '#function_call'
      }
      {
        'include': '#keyword'
      }
      {
        'include': '#number'
      }
      {
        'include': '#comment'
      }
    ]
    'repository':
      'array':
        'patterns': [
          {
            'begin': '\\['
            'end': '\\]((\\.)?\'*)'
            'endCaptures':
              '1':
                'name': 'keyword.operator.transpose.julia'
            'name': 'array.julia'
            'patterns': [
              {
                'match': '\\bend\\b'
                'name': 'constant.numeric.julia'
              }
              {
                'include': '$self'
              }
            ]
          }
        ]
      'bracket':
        'patterns': [
          {
            'match': '(?:\\(|\\)|\\[|\\]|\\{|\\}|,)(?!(\'|(?:\\.\'))*\\.?\')'
            'name': 'bracket.julia'
          }
        ]
      'comment':
        'patterns': [
          {
            'captures':
              '1':
                'name': 'punctuation.definition.comment.julia'
            'match': '(?<!\\$)(#)(?!\\{).*$\\n?'
            'name': 'comment.line.number-sign.julia'
          }
        ]
      'function_call':
        'patterns': [
          {
            'begin': '([a-zA-Z0-9_]+!?)\\w*\\('
            'beginCaptures':
              '1':
                'name': 'support.function.julia'
            'end': '\\)((\'|(\\.\'))*\\.?\')?'
            'endCaptures':
              '1':
                'name': 'keyword.operator.transposed-func.julia'
            'patterns': [
              {
                'include': '$self'
              }
            ]
          }
        ]
      'function_decl':
        'patterns': [
          {
            'match': '^\\s*([a-zA-Z0-9\\._]+!?)(?=.*\\)\\s*=(?!=))'
            'captures':
              '1':
                'name': 'entity.name.function.julia'
          }
          {
            'match': '\\b(function|macro)\\s+([a-zA-Z0-9_\\.]+!?)\\b'
            'captures':
              '1':
                'name': 'keyword.other.julia'
              '2':
                'name': 'entity.name.function.julia'
          }
        ]
      'keyword':
        'patterns': [
          {
            'match': '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b'
            'name': 'keyword.other.julia'
          }
          {
            'match': '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b'
            'name': 'keyword.control.julia'
          }
          {
            'match': '\\b(?:global|local|const|export|import|importall|using)\\b'
            'name': 'storage.modifier.variable.julia'
          }
          {
            'match': '@\\w+\\b'
            'name': 'support.function.macro.julia'
          }
        ]
      'number':
        'patterns': [
          {
            'match': '((\\b0(x|X)[0-9a-fA-F]+)|(\\b0o[0-7]+)|(\\b0b[0-1]+)|((\\b[0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]*)?(im)?|\\bInf(32)?\\b|\\bNaN(32)?\\b)'
            'name': 'constant.numeric.julia'
          }
          {
            'match': '\\btrue\\b|\\bfalse\\b|\\bnothing\\b'
            'name': 'constant.language.julia'
          }
        ]
      'operator':
        'patterns': [
          {
            'match': '(?:=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=)'
            'name': 'keyword.operator.update.julia'
          }
          {
            'match': '(?:\\?|:)'
            'name': 'keyword.operator.ternary.julia'
          }
          {
            'match': '(?:\\|\\||&&|!)'
            'name': 'keyword.operator.boolean.julia'
          }
          {
            'match': '(?:->|<-|-->)'
            'name': 'keyword.operator.arrow.julia'
          }
          {
            'match': '(?:>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>)'
            'name': 'keyword.operator.relation.julia'
          }
          {
            'match': '(?::)'
            'name': 'keyword.operator.range.julia'
          }
          {
            'match': '(?:<<|>>)'
            'name': 'keyword.operator.shift.julia'
          }
          {
            'match': '(?:\\||\\&|~)'
            'name': 'keyword.operator.bitwise.julia'
          }
          {
            'match': '(?:\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^)'
            'name': 'keyword.operator.arithmetic.julia'
          }
          {
            'match': '(?:::)'
            'name': 'keyword.operator.isa.julia'
          }
          {
            'match': '(?:\\.(?=[a-zA-Z])|\\.\\.+)'
            'name': 'keyword.operator.dots.julia'
          }
          {
            'match': '(?:\\$(?=.+))'
            'name': 'keyword.operator.interpolation.julia'
          }
          {
            'captures':
              '2':
                'name': 'keyword.operator.transposed-variable.julia'
            'match': '(\\w+)((\'|(\\.\'))*\\.?\')'
          }
          {
            'captures':
              '1':
                'name': 'keyword.bracket.end.julia'
              '2':
                'name': 'keyword.operator.transposed-matrix.julia'
            'match': '(\\])((?:\'|(?:\\.\'))*\\.?\')'
          }
          {
            'captures':
              '1':
                'name': 'keyword.bracket.end.julia'
              '2':
                'name': 'keyword.operator.transposed-parens.julia'
            'match': '(\\))((?:\'|(?:\\.\'))*\\.?\')'
          }
        ]
      'string':
        'patterns': [
          {
            'match': '(?<![a-zA-Z0-9:<]:)(?<=:)[a-zA-Z_][a-zA-Z0-9_]*\\b'
            'name': 'string.quoted.symbol.julia'
          }
          {
            'begin': '\''
            'beginCaptures':
              '0':
                'name': 'punctuation.definition.string.begin.julia'
            'end': '\''
            'endCaptures':
              '0':
                'name': 'punctuation.definition.string.end.julia'
            'name': 'string.quoted.single.julia'
            'patterns': [
              {
                'include': '#string_escaped_char'
              }
            ]
          }
          {
            'begin': '"'
            'beginCaptures':
              '0':
                'name': 'punctuation.definition.string.begin.julia'
            'end': '"'
            'endCaptures':
              '0':
                'name': 'punctuation.definition.string.end.julia'
            'name': 'string.quoted.double.julia'
            'patterns': [
              {
                'include': '#string_escaped_char'
              }
            ]
          }
          {
            'begin': '\\b\\w+"'
            'beginCaptures':
              '0':
                'name': 'punctuation.definition.string.begin.julia'
            'end': '"\\w*'
            'endCaptures':
              '0':
                'name': 'punctuation.definition.string.end.julia'
            'name': 'string.quoted.custom-double.julia'
            'patterns': [
              {
                'include': '#string_custom_escaped_char'
              }
            ]
          }
          {
            'begin': '`'
            'beginCaptures':
              '0':
                'name': 'punctuation.definition.string.begin.julia'
            'end': '`'
            'endCaptures':
              '0':
                'name': 'punctuation.definition.string.end.julia'
            'name': 'string.quoted.backtick.julia'
            'patterns': [
              {
                'include': '#string_escaped_char'
              }
            ]
          }
        ]
      'string_custom_escaped_char':
        'patterns': [
          {
            'match': '\\\\"'
            'name': 'constant.character.escape.julia'
          }
        ]
      'string_escaped_char':
        'patterns': [
          {
            'match': '\\\\(\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)'
            'name': 'constant.character.escape.julia'
          }
        ]
    'scopeName': 'source.julia'
    'uuid': 'F5D95417-DF9F-48AD-92DF-21CE62F7C31B'
  }
]

Any clues?

EDIT: By “errors” I mean that I can’t type into any editor windows, and get a message that just says “Uncaught TypeError: Cannot call method ‘replace’ of undefined”