forked from facelessuser/BracketHighlighter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bh_core.sublime-settings
executable file
·584 lines (559 loc) · 20.8 KB
/
bh_core.sublime-settings
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
{
//Debug logging
"debug_enable": false,
// When only either the left or right bracket can be found
// this defines if the unmatched bracket should be shown.
"show_unmatched": true,
// Do the opposite of "show_unmatched" for the languages listed below
"show_unmatched_exceptions": [],
// Enable high visibility by default when sublime starts up
// If sublime is already running and this gets changed,
// you will not see any changes (restart required to see change)
"high_visibility_enabled_by_default": false,
// Experimental: Creates a visible bar at the beginning of all lines between
// multiline bracket spans.
"content_highlight_bar": false,
// Experimental: Align the content highlight bar at the bracket indent level
"align_content_highlight_bar": false,
// Show brackets in the minimap.
// Depending on your highlight style, regions may not be visible in minimap.
// "underline" won't show up due to it being a style consisting of
// multiple zero width selections to create a fat underline.
// But the following styles should show up fine as they are normal regions styles:
// - thin_underline
// - solid
// - outline
// - squiggly
// - stippled
"show_in_minimap": false,
// High visibility style and color for high visibility mode
// (solid|outline|underline)
// ST3 has additional options of (thin_underline|squiggly|stippled)
"high_visibility_style": "outline",
// (scope|__default__|__bracket__)
"high_visibility_color": "__bracket__",
// Match brackets only when the cursor is touching the inside of the bracket
"match_only_adjacent": false,
// Outside adjacent bracket matching
"bracket_outside_adjacent": true,
// EXPERIMENTAL: Special matching mode for block cursor.
// Essentially, this provides a matching mode that makes a little more
// sense to some in regards to the visual representation of block cursors.
// This will ignore "bracket_outside_adjacent".
"block_cursor_mode": false,
// When "bracket_outside_adjacet" is set, and a plugin command explicitly sets
// "no_outside_adj" to "None" instead of "true" or the default "false",
// this value will be used.
"ignore_outside_adjacent_in_plugin": true,
// When "block_cursor_mode" is set, and a plugin command explicitly sets
// "no_block_mode" to "None" instead of "true" or the default "false",
// this value will be used.
"ignore_block_mode_in_plugin": true,
// Character threshold to search
"search_threshold": 5000,
// Ignore threshold
"ignore_threshold": false,
// Set mode for string escapes to ignore (regex|string)
"bracket_string_escape_mode": "string",
// Set max number of multi-select brackets that will be searched automatically
"auto_selection_threshold" : 10,
// Enable this to completely kill highlighting if "auto_selection_threshold"
// is exceeded. Default is to highlight up to the "auto_selection_threshold".
"kill_highlight_on_threshold": true,
// Disable gutter icons when doing multi-select
"no_multi_select_icons": false,
// Rules that define the finding and matching of brackets
// that are contained in a common scope.
// Useful for bracket pairs that are the same but
// share a common scope. Brackets are found by
// Finding the extent of the scope and using regex
// to look at the beginning and end to identify bracket.
// Use only if they cannot be targeted with traditional bracket
// rules.
"scope_brackets": [
// Quotes
{
"name": "py_single_quote",
"open": "(?:u|b)?r?((?:'')?')",
"close": "((?:'')?')",
"style": "single_quote",
"scopes": ["string"],
"language_filter": "whitelist",
"language_list": [
"Python",
"PythonImproved",
"MagicPython"
],
"sub_bracket_search": "true",
"plugin_library": "bh_modules.pyquotes",
"enabled": true
},
{
"name": "py_double_quote",
"open": "(?:u|b)?r?((?:\"\")?\")",
"close": "((?:\"\")?\")",
"style": "double_quote",
"scopes": ["string"],
"language_filter": "whitelist",
"language_list": [
"Python",
"PythonImproved",
"MagicPython"
],
"sub_bracket_search": "true",
"plugin_library": "bh_modules.pyquotes",
"enabled": true
},
{
"name": "single_quote",
"open": "(')",
"close": "(')",
"style": "single_quote",
"scopes": ["string", "string.quoted"],
"language_filter": "blacklist",
"language_list": ["Plain text", "Hex"],
"sub_bracket_search": "true",
"enabled": true
},
{
"name": "double_quote",
"open": "(\")",
"close": "(\")",
"style": "double_quote",
"scopes": ["string", "string.quoted"],
"language_filter": "blacklist",
"language_list": ["Plain text", "Hex"],
"sub_bracket_search": "true",
"enabled": true
},
// Regex for different Languages
{
"name": "jsregex",
"open": " *(/)",
"close": "(/)[igm]*",
"style": "regex",
"scopes": ["string"],
"language_filter": "whitelist",
"language_list": ["JavaScript"],
"sub_bracket_search": "true",
"enabled": true
},
{
"name": "perlregex",
"open": "(?:m|s|tr)(.|\n)",
"close": "(.|\n)(?:[igmos]*)",
"style": "regex",
"scopes": ["string.regexp"],
"language_filter": "whitelist",
"language_list": ["Perl"],
"sub_bracket_search": "true",
"enabled": true
},
{
"name": "rubyregex",
"open": " *(/)",
"close": "(/)[imxo]*",
"style": "regex",
"scopes": ["string"],
"language_filter": "whitelist",
"language_list": ["Ruby", "RSpec", "Better RSpec"],
"sub_bracket_search": "true",
"enabled": true
},
// Markdown
{
"name": "mditalic",
"open": "(\\*|_)",
"close": "(\\*|_)",
"style": "default",
"scopes": ["markup.italic"],
"language_filter": "whitelist",
"language_list": ["Markdown", "Multimarkdown", "GithubFlavoredMarkdown"],
"sub_bracket_search": "true",
"enabled": true
},
{
"name": "mdbold",
"open": "(\\*\\*|__)",
"close": "(\\*\\*|__)",
"style": "default",
"scopes": ["markup.bold"],
"language_filter": "whitelist",
"language_list": ["Markdown", "Multimarkdown", "GithubFlavoredMarkdown"],
"sub_bracket_search": "true",
"enabled": true
},
{
"name": "mdcodeinline",
"open": "(`+)",
"close": "(`+)",
"style": "default",
"scopes": ["markup.raw.inline.markdown"],
"language_filter": "whitelist",
"language_list": ["Markdown", "Multimarkdown", "GithubFlavoredMarkdown"],
"sub_bracket_search": "true",
"plugin_library": "bh_modules.mdcode",
"enabled": true
},
{
"name": "mdcodeblock",
"open": "\\s*(`{3,}|~{3,})",
"close": "(`{3,}|~{3,})\\n?",
"style": "default",
"scopes": ["markup.raw.block.fenced.markdown, markup.raw.block.markdown.fenced"],
"language_filter": "whitelist",
"language_list": ["Markdown", "Multimarkdown", "GithubFlavoredMarkdown"],
"plugin_library": "bh_modules.mdcode",
"sub_bracket_search": "true",
"enabled": true
},
// LaTeX
{
"name": "latexmath_inline",
"open": "(\\$)",
"close": "(\\$)",
"style": "default",
"scopes": ["string.other.math.tex"],
"language_filter": "whitelist",
"language_list": ["LaTeX", "LaTeX (TikZ)", "knitr (Rnw)"],
"sub_bracket_search": "true",
"enabled": true
}
],
// Rule definitions for finding and matching brackets.
// Brackets are found by using regex and can use scope
// qualifiers exclude certain matches.
// Once all matches are found, the closest pair surrounding
// the cursor are selected.
"brackets": [
// Basic brackets
{
"name": "curly",
"open": "(\\{)",
"close": "(\\})",
"style": "curly",
"scope_exclude": ["string", "comment", "source.yaml-tmlanguage constant.character.escape"],
"scope_exclude_exceptions": ["text.tex string.other.math"],
"language_filter": "blacklist",
"language_list": ["Plain text", "Hex"],
"find_in_sub_search": "true",
"ignore_string_escape": true,
"enabled": true
},
{
"name": "round",
"open": "(\\()",
"close": "(\\))",
"style": "round",
"scope_exclude_exceptions": [
"text.tex string.other.math",
"punctuation.definition.string.begin.shell",
"punctuation.definition.string.end.shell"
],
"scope_exclude": [
"string",
"comment",
"punctuation.definition.case-pattern.shell",
"source.yaml-tmlanguage constant.character.escape"
],
"language_filter": "blacklist",
"language_list": ["Plain text", "Hex", "RTF"],
"find_in_sub_search": "true",
"ignore_string_escape": true,
"enabled": true
},
{
"name": "square",
"open": "(\\[)",
"close": "(\\])",
"style": "square",
"scope_exclude": ["string", "comment"],
"scope_exclude_exceptions": ["text.tex string.other.math", "source.yaml-tmlanguage meta.value -constant.character.escape"],
"language_filter": "blacklist",
"language_list": ["Plain text", "Hex", "RTF"],
"find_in_sub_search": "true",
"ignore_string_escape": true,
"enabled": true
},
// PHP Angle
{
"name": "php_angle",
"open": "(<\\?)(?:php)?",
"close": "(\\?>)",
"style": "angle",
"scope_exclude": ["string", "comment", "keyword.operator"],
"language_filter": "whitelist",
"language_list": ["HTML", "HTML 5"],
"enabled": true
},
// Angle
{
"name": "angle",
"open": "(<)(?=[^?%]|$)",
"close": "(?:(?<=[^?%])|(?<=^))(>)",
"style": "angle",
"scope_exclude": [
"string",
"comment",
"keyword.operator",
"source.ruby.rails.embedded.html",
"source.ruby.embedded.html"
],
"language_filter": "whitelist",
"language_list": [
"HTML",
"HTML 5",
"XML",
"PHP",
"HTML (Rails)",
"HTML (Jinja Templates)",
"HTML (Twig)",
"HTML (Django)",
"HTML+CFML",
"ColdFusion",
"ColdFusionCFC",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
],
"plugin_library": "bh_modules.tags",
"enabled": true
},
// CSSedit groups
{
"name": "cssedit_groups",
"open": "(/\\* *@group .*\\*/)",
"close": "(/\\* *@end *\\*/)",
"style": "default",
"scope_exclude": [],
"language_filter": "whitelist",
"language_list": ["CSS"],
"enabled": true
},
// Ruby embedded HTML
{
"name": "ruby_embedded_html",
"open": "((?:(?<=<%)|(?<=^)|(?<==)|(?<=<<))\\s*\\b(?:if|begin|case)\\b(?!:)|(?:(?<=<%)|(?<=^))\\s*\\b(?:for|until|unless|while|class|module|def\\b[\\p{Ll}\\p{Lu}]*)\\b(?!:)|(?<!:)\\bdo\\b(?!:))",
"close": "(?<=[\\s;])(end)\\b(?!:)",
"style": "default",
"scope_exclude": ["text.html", "source", "comment", "string"],
"scope_exclude_exceptions": [
"source.ruby.rails.embedded.html",
"source.ruby.embedded.html"
],
"plugin_library": "bh_modules.rubykeywords",
"language_filter": "whitelist",
"language_list": ["HTML", "HTML 5", "PHP", "HTML (Rails)"],
"enabled": true
},
// Ruby conditional statements
{
"name": "ruby",
"open": "((?:(?<=^)|(?<==)|(?<=<<))\\s*\\b(?:if|begin|case)\\b(?!:)|^\\s*\\b(?:for|until|unless|while|class|module|def\\b[\\p{Ll}\\p{Lu}]*)\\b(?!:)|(?<!:)\\bdo\\b(?!:))",
"close": "(?<=[\\s;])(end)\\b(?!:)",
"style": "default",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.rubykeywords",
"language_filter": "whitelist",
"language_list": ["Ruby", "RSpec", "Better RSpec", "Ruby on Rails"],
"enabled": true
},
// C/C++ compile switches
{
"name": "c_compile_switch",
"open": "(\\#(?:if|ifdef|ifndef))\\b",
"close": "(\\#endif)\\b",
"style": "c_define",
"scope_exclude": ["string", "comment"],
"language_filter": "whitelist",
"language_list": ["C++", "C", "Objective-C", "CCpp", "C Improved"],
"enabled": true
},
// PHP conditional keywords
{
"name": "php_keywords",
"open": "(?:^\\s*|<\\?(?:php)?\\s*)?\\b(if|foreach|for|while|switch)\\b(?=.*:\\s*(?:\\?>\\s*)?$)",
"close": "(?:^\\s*|<\\?(?:php)?\\s*)?\\b(endif|endfor|endforeach|endwhile|endswitch)\\b(?=\\s*;\\s*(?:\\?>\\s*)?$)",
"style": "default",
"language_filter": "whitelist",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.phpkeywords",
"language_list": [
"HTML",
"HTML 5",
"XML",
"PHP",
"HTML+CFML",
"ColdFusion",
"ColdFusionCFC"
],
"enabled": true
},
// Erlang conditional statements
{
"name": "erlang",
"open": "\\s*(\\b(?:if|case|begin|try|fun(?=\\s*\\()|receive)\\b)",
"close": "\\b(end)\\b",
"style": "default",
"scope_exclude": ["string", "comment"],
"language_filter": "whitelist",
"plugin_library": "bh_modules.lowercase",
"language_list": ["Erlang", "HTML (Erlang)"],
"enabled": true
},
//Bash
{
"name": "bash",
"open": "(?:(?<!\\\\\\n)(?:;|^|&|\\|)\\s*)\\b(if|case|while|select|until|for)\\s",
"close": "(?:(?<!\\\\\\n)(?:;|^)\\s*)\\b(fi|esac|done)(?=;|\\s|$)",
"style": "default",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.bashsupport",
"language_filter": "whitelist",
"language_list": ["Shell-Unix-Generic"],
"enabled": true
},
//Fish shell
{
"name": "fish",
"open": "(?:(?<!\\\\\\n)(?:;|^|&|\\||and|or|not)\\s*)\\b(begin|if|while|for|switch|function)(?:;|\\s)",
"close": "(?:(?<!\\\\\\n)(?:;|^)\\s*)\\b(end)(?=;|\\s|$)",
"style": "default",
"scope_exclude": ["string", "comment"],
"language_filter": "whitelist",
"language_list": ["fish"],
"enabled": true
},
// Lua
{
"name": "lua",
"open": "(?<=[\\s;])(if|while|function|do|repeat)\\b",
"close": "(?<=[\\s;])(end|until)\\b",
"style": "default",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.luakeywords",
"language_filter": "whitelist",
"language_list": ["Lua"],
"enabled": true
},
// LaTeX
{
"name": "latexenv",
"open": "(\\\\begin{[^}]*})",
"close": "(\\\\end{[^}]*})",
"style": "tag",
"scope_exclude": ["comment"],
"plugin_library": "bh_modules.latexenvironments",
"language_filter": "whitelist",
"language_list": ["LaTeX", "LaTeX (TikZ)", "knitr (Rnw)"],
"sub_bracket_search": "true",
"enabled": true
},
// Pascal
{
"name": "pascal",
"open": "(?:(?<=^)|(?<=[\\s;]))(try|(?<=\\=\\s)(?:class|record|interface)|begin|repeat)\\b",
"close": "(?<=[\\s;])(end(?=[;\\s])|until(?=\\s))",
"style": "default",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.pascalkeywords",
"language_filter": "whitelist",
"language_list": ["Pascal"],
"enabled": true
},
// Elixir
{
"name": "elixir",
"open": "\\b(do$|fn)\\b",
"close": "\\b(end)\\b",
"style": "default",
"scope_exclude": ["string", "comment"],
"language_filter": "whitelist",
"language_list": ["Elixir"],
"enabled": true
}
],
// user_scope_brackets and user_brackets will be appended
// to the tail of scope_brackets and brackets respectively
// If you have custom rules that you don't want to commit to
// the official list, and do not need to be inserted before
// one of the official definitions, this is a good place to
// put yours rules and keep in sync with the defaults.
"user_scope_brackets": [],
"user_brackets": [],
// Define region highlight styles
"bracket_styles": {
// "default" and "unmatched" styles are special
// styles. If they are not defined here,
// they will be generated internally with
// internal defaults.
// "default" style defines attributes that
// will be used for any style that does not
// explicitly define that attribute. So if
// a style does not define a color, it will
// use the color from the "default" style.
"default": {
"icon": "dot",
// BH1's original default color for reference
// "color": "entity.name.class",
"color": "brackethighlighter.default",
"style": "underline"
},
// This particular style is used to highlight
// unmatched bracket pairs. It is a special
// style.
"unmatched": {
"icon": "question",
// "color": "brackethighlighter.unmatched",
"style": "outline"
},
// User defined region styles
"curly": {
"icon": "curly_bracket"
// "color": "brackethighlighter.curly",
// "style": "underline"
},
"round": {
"icon": "round_bracket"
// "color": "brackethighlighter.round",
// "style": "underline"
},
"square": {
"icon": "square_bracket"
// "color": "brackethighlighter.square",
// "style": "underline"
},
"angle": {
"icon": "angle_bracket"
// "color": "brackethighlighter.angle",
// "style": "underline"
},
"tag": {
"icon": "tag"
// "color": "brackethighlighter.tag",
// "style": "underline"
},
"c_define": {
"icon": "hash"
// "color": "brackethighlighter.c_define",
// "style": "underline"
},
"single_quote": {
"icon": "single_quote"
// "color": "brackethighlighter.quote",
// "style": "underline"
},
"double_quote": {
"icon": "double_quote"
// "color": "brackethighlighter.quote",
// "style": "underline"
},
"regex": {
"icon": "regex"
// "color": "brackethighlighter.quote",
// "style": "underline"
}
}
}