-
Notifications
You must be signed in to change notification settings - Fork 16
/
ModernPerl-scopes-default.yaml.ep
107 lines (88 loc) · 5.12 KB
/
ModernPerl-scopes-default.yaml.ep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# DO NOT edit this file. Edit ModernPerl-scopes-user.yaml.ep instead.
# Any changes made to this file will be lost when ModernPerl is updated.
# Building ModernPerl yourself is an experimental feature and doesn't work very well for Sublime
# Text 3. You can safely ignore that this is even possible.
# To modify the definitions in this file, simply override them in the user settings file. To disable
# one of these definitions, override it, but leave the value blank. You should then run
# yaml2plist.pl to rebuild ModernPerl.tmLanguage. YAML::Tiny is quite buggy, and if it's giving you
# unhelpful error messages then consider installing YAML::XS yourself. It will automatically be
# chosen above YAML::Tiny if it's installed.
# You can use $ to refer to another entry in the list. The name of one of these references can only
# contain letters, numbers, and underscores. You can refer to stuff further down in the list, and
# recursive references even work (just watch out of infinite recursion). You can refer to stuff in
# this file from the other settings file, but, since this is still experimental, beware that this
# file could change from update to update without notice.
# Entries prefixed with a _ are "private". This denotes that they are only be used in the
# construction of the list. All other entries here are used somewhere in ModernPerl. I tried to
# break things up into enough groups to suit everyone's needs, but if you need an extra group for
# something then please contact me.
# A list of scopes can be specified by putting spaces between the scopes, or using YAML's >- syntax.
# See the documentation on "Scope ranking" for imformation on which one will be chosen by a theme.
# An easy way to see what scopes a language uses is to install "ScopeAlways". Activate it using
# Sublime's Command Palette or otherwise. Then just type in the language to produce a colour, and
# see the scope in the status bar. You can also try wading around in .tmTheme files to see what
# scopes each language has rules for.
# Documentation:
# Standard scopes: http://manual.macromates.com/en/language_grammars#naming_conventions
# Scope ranking: http://manual.macromates.com/en/scope_selectors#ranking_matches
_keyword: keyword.other
keyword_control: keyword.control # keywords like if, sub, return, last
keyword_package: $keyword_control.package # keywords like package, use, no
keyword_string: $keyword_function # keywords like qq, qw, m, s, tr
keyword_filetest: $_keyword.filetest # filetest operators like -f, -d, -X
keyword_operator: $_keyword.operator # named operators like eq, and, not, x
keyword_token: $_autoquoted.token # special tokens like __PACKAGE__, __LINE__
keyword_function: $_keyword.function # all other keywords like print, undef, exit
# keywords like my and our
keyword_storage: >-
$_keyword.storage
storage.modifier
variable.parameter
variable.other.readwrite.global
# sub name (prototype) { }
sub_name: entity.name.function
sub_prototype: storage.type.method
comment_line: comment.line.number-sign
comment_block: comment.block # things like =pod, __END__
variable: punctuation.definition.var # $ @ % * variables outside strings
function: support.function # barewords. identifiers not already highlighted
method: $function.method # Foo->method, $foo->method
number: punctuation.definition.number
string_variable: $keyword_storage # $ and @ variables inside strings
string_escape: constant.character.escape # \ escapes inside strings
string_single: string.quoted.single # '', q, qw, s''', etc.
string_double: string.quoted.double # "", qq, s//this part is double/
string_backtick: string.interpolated # ``, qx
string_unquoted: string.unquoted # <<heredocs and format
string_glob: $string_double # readline and glob syntax (<FILE> and <foo/*.bar>)
string_version: string.other.version # vstrings (1.0.1 and v1.0)
string_regexp: string.regexp # m//, qr//, s/this part is regex//
string_regexp_modifier: keyword.operator # m//modifiers, s///modifiers
# string_transliteration: string.other.transliteration # TODO
# autoquoted strings like:
# string => "value"
# use string
# $foo{string}
# string->doit()
string_autoquoted: $_autoquoted.string
_autoquoted: constant.language
# Foo::Bar in package Foo::Bar
string_package: >-
entity.name.type.class
$string_autoquoted
# LABEL: {} or last LABEL
label: $_autoquoted.label
filehandle: $_autoquoted.filehandle # close FILEHANDLE or accept SOCK, SOCK2
# string quotes (the // in qw//) or pairs (the () in qw())
string_quote_begin: punctuation.definition.string.begin
string_quote_end: punctuation.definition.string.end
# disabled because they cause issues
string_pair_begin:
string_pair_end:
# these are here just so that you can disable them
_error: invalid.illegal
_bad: invalid.deprecated
invalid_number: $_error.number
invalid_modifier: $_error # regex modifiers
invalid_pod_tab: $_bad # tab characters within POD
invalid_else_if: $_error.else_if