urbit/extras/hoonSublime/hoon.YAML-tmLanguage
Dan Haffey d93489838d Improve sublime arm name indexing.
The previous definition included the leading ++ in the
indexed name, which thwarts "Goto Definition". This also
tweaks the pattern to include arms defined with +-.
2015-11-16 18:15:32 -05:00

52 lines
1.1 KiB
YAML

# [PackageDev] target_format: plist, ext: tmLanguage
---
name: hoon
scopeName: source.hoon
fileTypes: [hoon, hook]
uuid: 9a56507d-ae34-4bd0-84fa-079029cb9509
patterns:
- comment: comment
name: comment.line.hoon
begin: '::'
end: \n
- comment: doqbloq
name: string.double.hoon
begin: \s*"""
end: \s*"""
- comment: soqbloq
name: string.double.hoon
begin: \s*'''
end: \s*'''
- comment: tape
name: string.double.hoon
begin: \"
patterns: [{match: '\\.|[^"]'}]
end: \"
- comment: cord
name: string.single.hoon
begin: \'
patterns: [{match: "\\\\.|[^']"}]
end: \'
- comment: arm
name: constant.character.hoon
match: "[a-z]([a-z0-9-]*[a-z0-9])?/"
- comment: arm
contentName: entity.name.function.hoon
begin: "\\+[-+] (?=[a-z]([a-z0-9-]*[a-z0-9])?)"
end: "(?![a-z0-9-])"
- comment: cube
name: constant.character.hoon
match: "%[a-z]([a-z0-9-]*[a-z0-9])?"
- comment: odor
name: storage.type.hoon
match: "@[a-z]([a-z0-9-]*[a-z0-9])?"
- comment: rune
name: keyword.control.hoon
match: "[+\\-|$%:.#^~;=?!_,&@\\/<>%*]"
- comment: rune
name: keyword.control.hoon
begin: ';script(type "text/coffeescript")'
end: '=='
...