forked from quarnster/SublimeClang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SublimeClang.sublime-settings
289 lines (255 loc) · 10.6 KB
/
SublimeClang.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
{
// All options in here can also be specified in your project settings
// with a prepended "sublimeclang_" for example if you have
//
// "settings":
// {
// "sublimeclang_show_visual_error_marks": false
// }
//
// in your project settings, this will override the settings specified
// in this file and in your user settings.
// Whether or not the plugin is enabled. Useful if you want to disable
// the plugin completely for a specific project.
"enabled": true,
// Wheter or not fast completions are enabled. Usually you'd put
// "sublimeclang_enable_fast_completions": false, in the project
// settings if it's problematic in that project. You can also
// runtime toggle fast completions alt+d,alt+f, however if it
// is disabled for the current project (or globally in your
// user settings) it will not be enabled. In other words
// this setting, when set to false, overrides whatever the
// keyboard toggle is set to.
"enable_fast_completions": true,
// Delay in ms until recompiling the file after the buffer is modified
// Set to 0 to disable
"recompile_delay": 0,
// Whether or not to hide the clang output panel when it's empty
"hide_output_when_empty": false,
// Whether or not to automatically show the output panel.
// If set to false, the default key-binding alt+d,alt+p
// will show it
"show_output_panel": true,
// Whether or not to show the clang parser status in the status bar
"show_status": true,
// When set to true, will display visual error markers. recompile_delay
// must be set to > 0
"show_visual_error_marks": true,
// This is the bitmask sent to index.parse.
// For example, to be able to go to the definition of
// preprocessed macros, set it to 1, for using an implicit
// precompiled header set it to 4 and for caching completion
// results, set it to 8. Or all together 1+4+8=13.
//
// See http://clang.llvm.org/doxygen/group__CINDEX__TRANSLATION__UNIT.html#gab1e4965c1ebe8e41d71e90203a723fe9
// and http://clang.llvm.org/doxygen/Index_8h_source.html
// for more details
"index_parse_options": 13,
// If set to false, the main thread will lock while parsing
// the file, but commands will work the first time they are
// executed rather than the first time after warm up has
// finished
"warm_up_in_separate_thread": true,
// If set to true will warm up the cache for supported files
// when they are opened
"cache_on_load": true,
// If set to true will remove the file from the cache when
// it is closed
"remove_on_close": true,
// If set to true will pop the file from the navigation stack
// (automatic alt+d,alt+b) when the file is closed
"pop_on_close": true,
// When set to true a reparse command will be triggered
// when a view is activated
"reparse_on_activated": true,
// When set to true a reparse command will be triggered
// when a view is saved
"reparse_on_save": true,
// When set to true will display parse status messages
"parse_status_messages": true,
// When set to true will display analyzer status messages
"analyzer_status_messages": true,
// Scope used for markers in the clang output panel
"marker_output_panel_scope": "invalid",
// Scope used for warning markers
"marker_warning_scope": "comment",
// Scope used for error markers
"marker_error_scope": "invalid",
// Whether or not to print out timing information for the complete operation
"time_completions": false,
// Whether or not to inhibit the Sublime Text 2 built in word completions
"inhibit_sublime_completions": true,
// Don't show stuff in the autocomplete list when the name starts with the following
"dont_complete_startswith":
[
"~",
"operator"
],
// If set to true it'll add for example "-x c++" to the options for c++ files
"add_language_option": true,
// Addtional language specific options for clang.
// This option only works when "add_language_option" is set to true.
"additional_language_options":
{
// For example, you can use "c++": ["-std=c++11"] to enable C++11 features.
"c++" : [],
"c": [],
"objc": [],
"objc++": []
},
// Any options you want to give to clang
// This can also be specified as project specific options. Choose the menu item
// Project->Edit Project, and then add something like the following to the
// "settings" section:
//
// "sublimeclang_options":
// [
// "-I/project/specific/path/1",
// "-I/project/specific/path/2"
// ]
//
// If your project does not have a settings section it would look like this:
//
// "settings":
// {
// "sublimeclang_options":
// [
// "-I/project/specific/path/1",
// "-I/project/specific/path/2"
// ]
// }
//
// If "sublimeclang_options" exists in your project settings, it'll override
// rather than add to the "options" defined in SublimeClang.sublime-settings.
//
// Note that the project settings aren't applied for already cached files,
// so to make them take effect you'll have to clear the cache first. The
// default keybinding for clearing the cache is alt+d,alt+c.
//
// ${home}, ${project_path:} and ${folder:} tokens can be used in these options.
//
// ${home} is replaced with the value of the HOME environment variable.
//
// ${project_path:} tries to find a file with the given name in all the registered project folders and
// returns the first file found, or the original file name if none is found.
// Example: ${project_path:main.cpp} tries to find a file named "main.cpp" relative
// to the current project's folders. If none is found, it is replaced with "main.cpp".
//
// ${folder:} is replaced with the dirname of the given path.
// Example: ${folder:/path/to/file} is replaced with "/path/to".
//
// Replacement is done sequencially, first all ${home} tokens, then all ${project_path:} are resolved, and then the
// ${folder:} are replaced.
//
// So for example, you might specify:
// "-I${folder:${project_path:main.cpp}}",
// "-I${folder:${project_path:main.cpp}}/includepath",
// "-I${folder:${project_path:main.cpp}}/anotherincludepath"
//
// And it will expand into:
// "-I<path of the project folder containing main.cpp>",
// "-I<path of the project folder containing main.cpp>/includepath",
// "-I<path of the project folder containing main.cpp>/anotherincludepath"
//
//
//
// You can also add an '*' or '**' to the end of a path.
// '*' will include all the subdirectories (non-recursive) of that path (not including the given path)
// '**' will expand to include all subdirectories recursively (not including the given path)
//
// Both with ignore any directories that begin with '.', but you can still specify those manually
//
//
// For example, imagine we had a directory structure like so:
//
// myproject/myproject.sublime-project
// myproject/src
// myproject/src/.hidden-dir
// myproject/src/ModuleA
// myproject/src/ModuleB
// myproject/src/ModuleC/SubmoduleC-A
// myproject/src/ModuleC/SubmoduleC-B
// myproject/includes
// myproject/includes/something
// myproject/includes/somethingelse
// myproject/includes/morethings
// myproject/includes/evenmorethings/asdf
//
//
// an option like this:
// "-I${folder:${project_path:myproject.sublime-project}}/src/**",
//
// will expand to:
// "-I/path/to/myproject/src/ModuleA",
// "-I/path/to/myproject/src/ModuleB",
// "-I/path/to/myproject/src/ModuleC/SubmoduleC-A",
// "-I/path/to/myproject/src/ModuleC/SubmoduleC-B",
//
// Note that src and .hidden-dir were skipped
//
//
// an option like this:
// "-I${folder:${project_path:myproject.sublime-project}}/includes/*",
// will expand to:
// "-I/path/to/myproject/includes/something",
// "-I/path/to/myproject/includes/somethingelse",
// "-I/path/to/myproject/includes/morethings",
// "-I/path/to/myproject/includes/evenmorethings",
//
// Notice that the both the myproject/includes directory and any directories more than one level deep are skipped
//
// Set "debug_options" (defined below) to true to print the final options used for compilation to the python console
"options":
[
"-Wall",
"-I/usr/lib/clang/3.0/include/",
"-I/usr/lib/clang/2.1/include/",
"-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
"-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
// If you code for iOS, you want to have something like the following here:
//"-isysroot",
//"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk",
//"-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300",
"-IC:/MinGW/include",
"-I/path/to/sources/1",
"-I/path/to/sources/2"
],
// A command that can be run to fetch actual options for a source file in a build system.
// The script should print on stdout a list of space or newline separated options
// that will be appended to the static list in "options".
//
// This setting will also have its ${home}, ${project_path:} and ${folder:} tokens expanded
// and can be configured in project files.
//
// Example:
// "${project_path:scriptName.sh} someArgument1 someArgument2"
// if scriptName.sh is present under the project's folders, will be executed as:
// "/path/to/scriptName.sh someArgument1 someArgument2 currentViewFileName"
// before each time a file needs to be parsed by clang.
"options_script": "",
// When set to true will output the final options used to the python console
"debug_options": false,
// Scope used for markers in the clang output panel
"marker_analyzer_output_panel_scope": "invalid",
// Scope used for markers by the analyzer in the file views
"marker_analyzer_scope": "invalid",
// Commandline used to invoke the static analyzer.
// "options" will be appended to this
"analyzer_commandline":
[
"clang",
"--analyze",
"-o",
"-"
],
// Extensions to be scanned by the static analyzer
// when analyzing a project
"analyzer_extensions":
[
"cpp",
"c",
"cc",
"m",
"mm"
]
}