-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOpenUri.sublime-settings
114 lines (114 loc) · 5.87 KB
/
OpenUri.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
{
// how detailed log messages should be?
// values can be
// - "NOTHING" (do not show anything)
// - "CRITICAL" (something makes plugin not workable)
// - "ERROR" (something is wrong)
// - "WARNING" (something may be wrong)
// - "INFO" (those that users may interest in)
// - "DEBUG" (for developer)
// - "DEBUG_LOW" (for developer, even more detailed than DEBUG)
"log_level": "INFO",
// browser used to open a URI. leave this empty to use a default browser.
// available values could be found on https://docs.python.org/3.8/library/webbrowser.html#webbrowser.get
"browser": "",
// when to show a phantom/popup button beside a URI?
// values can be
// - "always" (always show buttons)
// - "hover" (only when the URI is hovered)
// - "never" (never show buttons)
"show_open_button": "always",
// if the file is too large, this setting will be used as the fallback setting of "show_open_button"
"show_open_button_fallback": "hover",
// should this plugin works for transient view such as "Go to Anywhere" preview?
"work_for_transient_view": false,
// if the file size is larger than the given one, it will uses "show_open_button_fallback" as the fallback mode
"large_file_threshold": 1000000, // 1MB
// the period (in millisecond) that consecutive modifications are treated as typing
// phantoms will be updated only when the user is not considered typing
"typing_period": 250,
// the interval (in millisecond) for checking whether to render the current view
// 500 means the background thread will check the current view should be re-rendered or not, every 500ms
"renderer_interval": 500,
// scope selectors used to expand regions of URIs
"expand_uri_regions_selectors": ["markup.underline.link"],
// the text HTML used in the hovering popup
"popup_text_html": "<span>Open this URI</span>",
// images used in this plugin (only supports PNG format)
// for other plugin-shipped images, visit https://github.com/jfcherng/Sublime-OpenUri/tree/st4/images
// if you don't like them, you can even define your own image path.
"image_files": {
"phantom": "Packages/${package_name}/images/FontAwesome/external-link-square.png",
"popup": "Packages/${package_name}/images/FontAwesome/share-square.png",
},
// colors which used to color corresponding images
// values can be
// - "" (empty string, use the original color of the image)
// - "@scope" (use the same color with the corresponding URI's)
// - "@scope_inverted" (use the inverted color of the corresponding URI's)
// - ST's scope (use the color of the scope)
// - color code in the form of "#RGB", "#RRGGBB" or "#RRGGBBAA"
"image_colors": {
"phantom": "#fa8c00",
"popup": "#fa8c00",
},
// draw URI regions such as adding a underline?
"draw_uri_regions": {
// when to draw URI regions?
// values can be
// - "always" (always draw)
// - "hover" (only when the URI is hovered)
// - "never" (never draw)
"enabled": "never",
// the scope used to highlight URI regions (you may customize it with your color scheme)
"scope": "string",
// icon in the gutter: "dot", "circle", "bookmark" or empty string for nothing
"icon": "",
// the draw flags used, see https://www.sublimetext.com/docs/api_reference.html
"flags": [
"HIDE_ON_MINIMAP",
"DRAW_SOLID_UNDERLINE",
"DRAW_NO_FILL",
"DRAW_NO_OUTLINE",
],
},
// defined schemes (case-insensitive) that wants to be detected
// you may add your own new schemes to be detected
// key / value = scheme / enabled
"detect_schemes": {
// URLs starting with "www" without a scheme
"": {"enabled": true, "path_regex": "www"},
// basic
"file://": {"enabled": true, "path_regex": "@default"},
"ftp://": {"enabled": true, "path_regex": "@default"},
"ftps://": {"enabled": true, "path_regex": "@default"},
"http://": {"enabled": true, "path_regex": "@default"},
"https://": {"enabled": true, "path_regex": "@default"},
"mailto:": {"enabled": true, "path_regex": "@default"},
// server
"sftp://": {"enabled": false, "path_regex": "@default"},
"ssh://": {"enabled": false, "path_regex": "@default"},
"telnet://": {"enabled": false, "path_regex": "@default"},
// P2P
"ed2k://": {"enabled": false, "path_regex": "@default"},
"freenet://": {"enabled": false, "path_regex": "@default"},
"magnet:?": {"enabled": false, "path_regex": "@default"},
// messenger
"irc://": {"enabled": false, "path_regex": "@default"},
"line://": {"enabled": false, "path_regex": "@default"},
"skype:": {"enabled": false, "path_regex": "@default"},
"tencent://": {"enabled": false, "path_regex": "@default"},
"tg://": {"enabled": false, "path_regex": "@default"},
},
// regexes (case-insensitive) used to match the URI's path part
"uri_path_regexes": {
// this is the default path regex for all schemes
"@default": "(?:[^\\s()\\[\\]{}<>`^*'\"“”‘’]|\\((?![/\\\\])[^\\s)]*\\)|\\[(?![/\\\\])[^\\s\\]]*\\]|\\{(?![/\\\\])[^\\s}]*\\})+(?<![:.,!?¡¿,。!?])",
// special case for URLs starting with "www" without a scheme
"www": "\\bwww\\.(?:[^\\s()\\[\\]{}<>`^*'\"“”‘’]|\\((?![/\\\\])[^\\s)]*\\)|\\[(?![/\\\\])[^\\s\\]]*\\]|\\{(?![/\\\\])[^\\s}]*\\})+(?<![:.,!?¡¿,。!?])",
// an example which can be used to match ASCII-only URIs
"ascii_only": "[a-z0-9@~_+\\-*/&=#%|:.,!?]+(?<=[a-z0-9@~_+\\-*/&=#%|])",
},
// how many neighbor chars from a cursor will be used to find a URI
"uri_search_radius": 200,
}