Skip to content

Instantly share code, notes, and snippets.

@leifwickland
Forked from anonymous/.ctags
Created August 18, 2012 01:13
Show Gist options
  • Save leifwickland/3383767 to your computer and use it in GitHub Desktop.
Save leifwickland/3383767 to your computer and use it in GitHub Desktop.
--langdef=scala
--langmap=scala:.scala
--regex-Scala=/^[ \t]*(abstract[ \t]*)*(sealed[ \t]*)*(case[ \t]*)*class[ \t]*([a-zA-Z0-9_]+)/\4/c,classes/
--regex-Scala=/^(case[ \t]*)*[ \t]*object[ \t]*([a-zA-Z0-9_]+)/\2/o,objects/
--regex-Scala=/^[ \t]*trait[ \t]*([a-zA-Z0-9_]+)/\1/t,traits/
--regex-Scala=/[ \t]*def[ \t]*([a-zA-Z0-9_=]+)[ \t]*.*[:=]/\1/m,methods/
--regex-Scala=/[ \t]*val[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/V,values/
--regex-Scala=/[ \t]*var[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/v,variables/
--regex-Scala=/^[ \t]*type[ \t]*([a-zA-Z0-9_]+)[ \t]*[\[<>=]/\1/T,types/
--regex-Scala=/^[ \t]*import[ \t]*([a-zA-Z0-9_{}., \t=>]+$)/\1/i,includes/
--regex-Scala=/^[ \t]*package[ \t]*([a-zA-Z0-9_.]+$)/\1/p,packages/
" Scala {{{3
let type_scala = {}
let type_scala.ctagstype = 'Scala'
let type_scala.kinds = [
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1 },
\ {'short' : 'V', 'long' : 'values', 'fold' : 0 },
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0 },
\ {'short' : 'T', 'long' : 'types', 'fold' : 0 },
\ {'short' : 't', 'long' : 'traits', 'fold' : 0 },
\ {'short' : 'o', 'long' : 'objects', 'fold' : 0 },
\ {'short' : 'a', 'long' : 'aclasses', 'fold' : 0 },
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0 },
\ {'short' : 'r', 'long' : 'cclasses', 'fold' : 0 },
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0 }
\ ]
let type_scala.sro = '.'
let type_scala.kind2scope = {
\ 'T' : 'type',
\ 't' : 'trait',
\ 'o' : 'object',
\ 'a' : 'abstract class',
\ 'c' : 'class',
\ 'r' : 'case class'
\ }
let type_scala.scope2kind = {
\ 'type' : 'T',
\ 'trait' : 't',
\ 'object' : 'o',
\ 'abstract class' : 'a',
\ 'class' : 'c',
\ 'case class' : 'r'
\ }
let s:known_types.scala = type_scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment