code: function(hljs) {
    var ANNOTATION = {
      className: 'annotation', begin: '@[A-Za-z]+'
    };
    var STRING = {
      className: 'string',
      begin: 'u?r?"""', end: '"""',
      relevance: 10
    };
    var SYMBOL = {
      className: 'symbol',
      begin: '\'\\w[\\w\\d_]*(?!\')'
    };
    return {
      keywords:
        'type yield lazy override def with val var false true sealed abstract private trait ' +
        'object null if for while throw finally protected extends import final return else ' +
        'break new catch super class case package default try this match continue throws',
      contains: [
        {
          className: 'javadoc',
          begin: '/\\*\\*', end: '\\*/',
          contains: [{
            className: 'javadoctag',
            begin: '@[A-Za-z]+'
          }],
          relevance: 10
        },
        hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE,
        STRING, hljs.QUOTE_STRING_MODE,
        SYMBOL,
        {
          className: 'class',
          begin: '((case )?class |object |trait )', // beginKeywords won't work because a single "case" shouldn't start this mode
          end: '({|$)', excludeEnd: true,
          illegal: ':',
          keywords: 'case class trait object',
          contains: [
            {
              beginKeywords: 'extends with',
              relevance: 10
            },
            hljs.UNDERSCORE_TITLE_MODE,
            {
              className: 'params',
              begin: '\\(', end: '\\)',
              contains: [
                hljs.QUOTE_STRING_MODE, STRING,
                ANNOTATION
              ]
            }
          ]
        },
        hljs.C_NUMBER_MODE,
        ANNOTATION
      ]
    };
  }
docs: /*
  Language: Scala
  Author: Jan Berkel <jan.berkel@gmail.com>