-
Notifications
You must be signed in to change notification settings - Fork 225
/
GitGutter.sublime-settings
239 lines (214 loc) · 10.4 KB
/
GitGutter.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
//
// Default values for GitGutter.sublime-settings
//
{
// CUSTOM PATH TO GIT BINARY.
// An empty string will search the PATH environment for "git".
//
// "git_binary": "",
//
// The setting may be a direct string to a git binary.
// An unix like path makes git run via Windows Subsystem for Linux
// on Windows 10. It fails if WSL is not available.
//
// "git_binary": "/usr/bin/git",
//
// Or it may be a dictionary keyed off what sublime.platform() returns,
// so it may be customized on a per-platform basis.
//
// "git_binary": {
// "default": "",
// "windows": "C:/Program Files/Git/cmd/git.exe",
// "linux": "/usr/bin/git",
// "osx": "/usr/bin/git"
// },
"git_binary": "",
// Additional environment variables to pass to git.
// This list is merged with the global set of environment variables
// provided by Sublime Text.
//
// Note:
// 1. Keys with value `None` are removed from the global environment.
// 2. If this dictionary is defined per view or project it is used
// exclusively! It won't be merged with the global settings.
"env": {
"GIT_OPTIONAL_LOCKS": 0
},
// The commit, branch, tag, or remote to compare against.
// This setting changes the initial compare target and can
// be temporarily overwritten by 'Compare against ...' commands
// Valid constants are:
// "HEAD": Compare against most recent commit
// "master": Compare against master branch
// "master@{upstream}": Compare against remote master branch
"compare_against": "HEAD",
// The algorithm used by git diff to determine the differences.
// "default": let git decide (don't pass an algorithm)
// "minimal": use minimal diff algorithm
// "patience": use patience diff algorithm
// see: http://bramcohen.livejournal.com/73318.html
// "histogram": use histogram diff algorithm
"diff_algorithm": "patience",
// Determines whether GitGutter ignores whitespace in modified files.
// Set "none" to ensure whitespace is considered in the diff
// Set "cr" to only ignore the carriage return at the end of lines (git 2.18+)
// Set "eol" to only ignore whitespace at the end of lines
// Set "space" to ignore changes in amount of white space
// Set "all" to ignore all white space
"ignore_whitespace": "none",
//
// Gutter Area
//
// Delay update of gutter icons by the following amount (in milliseconds).
"debounce_delay": 1000,
// Focus Change mode evaluates changes every time a view gets the focus
// Set false to disable evaluation when changing views
"focus_change_mode": true,
// Live mode evaluates changes every time file is modified,
// Set false to disable evaluation after each input
"live_mode": true,
// Determines whether the git_gutter_next_change and git_gutter_prev_change
// commands wrap around on reaching the beginning/ending of the file.
"next_prev_change_wrap": true,
// Do not set GitGutter icons in these regions
// Useful for making sure GitGutter does not override other
// regions, (e.g. Bookmarks, Linter/BracketHighlighter icons.)
"protected_regions": [
"sublimelinter-warning-gutter-marks",
"sublimelinter-error-gutter-marks",
"sublime_linter.protected_regions",
"bookmarks",
"lsp_error",
"lsp_warning",
"lsp_info",
"ecc"
],
// Show GitGutter information in the minimap
// =0: hide markers
// >0: width of markers
// -1: highlight full line
"show_in_minimap": 1,
// Add a special marker on untracked files
"show_markers_on_untracked_file": true,
// The gutter theme defines the icons to show for the different events.
"theme": "Default.gitgutter-theme",
//
// Diff Popup
//
// (ST3, Build 3119+ only)
// Enable hover popup, which shows a diff of the changed lines.
"enable_hover_diff_popup": true,
// (ST3 only) The default mode to open the diff popup. This will be
// used for the hover popup, the command palette entry,
// and the default key binding.
// Possible modes are:
// "default": Show the previous git state in the popup
// "diff": Compare the git state to the working state and highlight
// the differences in the popup
"diff_popup_default_mode": "default",
// Do not show the Diff Popup if a line contains these regions
// Useful for making sure GitGutter does not fight with other popups.
"diff_popup_protected_regions": [
"sublime_linter.protected_regions"
],
//
// Line Annotation
//
// (ST3, Build 3124+ only)
// Display a phantom text at the end of the active line with information
// about who changed it using the output of `git blame`.
// "auto" -- show line annotation if word wrap is disabled (default)
// "true" -- always show line annotation
// "false" -- never show line annotation
"show_line_annotation": "auto",
// (ST3, Build 3124+ only)
// The 1 based ruler index to align the line annotation text to.
//
// If no ruler is available the phantom is aligned to the end of line.
// If the selected ruler does not exist the most right one is used.
//
// Valid values are:
// "False" -- align to end of line (default)
// "1" -- align to first ruler
// "2" -- align of second ruler
// ...
"line_annotation_ruler": false,
// (ST3, Build 3124+ only)
// Whether to ignore whitespace changes when showing line annotations.
//
// Valid values are:
// "false" -- don't ignore whitespace changes (default)
// "true" -- ignore whitespace changes
"line_annotation_ignore_whitespace": false,
// LINE ANNOTATION TEXT TEMPLATE
// If the value is an array it is joined to a single string and passed to
// jinja2 template engine (if available) to render the blame message text.
// GitGutter provides the following variables:
// {{line_author}} -- the author, who introduced the change
// {{line_author_mail}} -- the e-mail address of the author
// {{line_author_age}} -- the time elapsed since the change
// {{line_author_time}} -- the time string of the change
// {{line_author_tz}} -- the timezone string of the change
// {{line_commit}} -- the hash of the changing committing
// {{line_committer}} -- the committer, who added the change to the repo
// {{line_committer_mail}}-- the e-mail address of the committer
// {{line_committer_age}} -- the time elapsed since the change
// {{line_committer_time} -- the time string of commit
// {{line_committer_tz} -- the timezone string of commit
// {{line_summary}} -- the first line of the commit message
// {{line_previous}} -- the hash of the previous commit
"line_annotation_text": "{% if line_commit and line_commit[:7] != '0000000' %} {{line_commit[:7]}} | {% endif %}{{line_author}} ({{line_author_age}}) · {{line_summary}}",
//
// Status Bar
//
// Determines whether GitGutter shows status information in the status bar.
// Set false to disable status information.
// Set true to show information using the "status_bar_text" template.
"show_status_bar_text": true,
// STATUS BAR TEXT TEMPLATE
// The array is joined to a single string and passed to jinja2 template
// engine to render the status message text. The template can be modified using
// jinja2 supported syntax. GitGutter provides the following variables:
// {{st_git_status}} -- Sublime Text git integration available and enabled
// {{repo}} -- repository name / folder name containing the .git directory
// {{branch}} -- checked out branch you are working on
// {{remote}} -- tracked remote of current branch you are working on or `None`
// {{ahead}} -- number of commits the local branch is ahead of remote
// {{behind}} -- number of commits the local branch is behind remote
// {{added_files}} -- number of untracked files added to working tree
// {{deleted_files}} -- number of files deleted from working tree
// {{modified_files}} -- number of modified files in the working tree
// {{staged_files}} -- number of files in the staging area
// {{compare}} -- commit/branch/HEAD the file is compared to
// {{state}} -- One of committed/modified/ignored/untracked
// {{deleted}} -- number of deleted regions
// {{inserted}} -- number of inserted lines
// {{modified}} -- number of modified lines
// {{line_author}} -- the author, who introduced the change
// {{line_author_mail}} -- the e-mail address of the author
// {{line_author_age}} -- the time elapsed since the change
// {{line_author_time}} -- the time string of the change
// {{line_author_tz}} -- the timezone string of the change
// {{line_commit}} -- the hash of the changing committing
// {{line_committer}} -- the committer, who added the change to the repo
// {{line_committer_mail}}-- the e-mail address of the committer
// {{line_committer_age}} -- the time elapsed since the change
// {{line_committer_time} -- the time string of commit
// {{line_committer_tz} -- the timezone string of commit
// {{line_summary}} -- the first line of the commit message
// {{line_previous}} -- the hash of the previous commit
"status_bar_text": [
"{% if repo and branch %}",
"{% if not st_git_status %}",
"{{repo}}/{{branch}}",
"{% if added_files + deleted_files + modified_files > 0 %}*{% endif %}, ",
"{% endif %}",
"{% if compare not in ('HEAD', branch, None) %}Comparing against {{compare}}, {% endif %}",
"{% if state %}File is {{state}}{% endif %}",
"{% if deleted > 0 %}, {{deleted}}-{% endif %}",
"{% if inserted > 0 %}, {{inserted}}+{% endif %}",
"{% if modified > 0 %}, {{modified}}≠{% endif %}",
"{% if line_commit and line_commit[:7] != '0000000' %}, ⟢ {{line_commit[:7]}} | {{line_author}} ({{line_author_age}}){% endif %}",
"{% endif %}"
]
}