-
Notifications
You must be signed in to change notification settings - Fork 6
/
Uncrustify.sublime-settings
131 lines (123 loc) · 5.69 KB
/
Uncrustify.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
{
// *** You should not modify the parameters here, just copy needs into the
// 'Settings - User' in Uncrustify's Package Settings.
//
// TIPS:
// All of these parameters can be supplied in a project settings file.
// Specifies the path to Uncrustify binary when not in the PATH.
// For example:
// "uncrustify_executable" : "C:/UTILS/Devel/uncrustify/uncrustify.exe"
"uncrustify_executable" : "",
// Specifies the config file for Uncrustify.
// For example:
// "uncrustify_config" : "C:/UTILS/Devel/uncrustify/cfg/defaults.cfg",
// NOTE:
// 1. If not set, then the UNCRUSTIFY_CONFIG environment variable is used.
// 2. The configuration file name can include the path variables like
// '${project_dir}', which will be expanded to the directory name of
// the current project settings file. This can help shared projects
// that include a project settings file (and an Uncrustify
// configuration) in their SCM. Additional environment variables are
// also expanded into the stream, so you can use ${HOME} or whatever.
//
// For example:
// "uncrustify_config" : "${project_dir}/uncrustify.cfg"
// or
// "uncrustify_config" : "${HOME}/.uncrustify"
//
// P.S:
// You can find/modify the example config files in Uncrustify/etc (from
// Uncrustify's source) or Uncrustify/cfg (from uncrustify's pre-built).
"uncrustify_config" : "",
// Overrides the default config (aka "uncrustify_config") when document
// matches one of below languages.
// NOTE:
// Only those languages supported by Uncrustify may be used here. The
// language names must be the names Uncrustify gives to the language
// (see Uncrustify doc).
"uncrustify_config_by_lang" :
[
// For example:
// All Java files use java.cfg and all Objective C files use obj.cfg,
// others use default...
// { "JAVA" : "C:/cfg/java.cfg" },
// { "OC" : "C:/cfg/obj.cfg" }
{ "C" : "" },
{ "CPP" : "" },
{ "D" : "" },
{ "CS" : "" }, // this is C#
{ "JAVA" : "" },
{ "PAWN" : "" },
{ "OC" : "" }, // this is Objective C
{ "OC+" : "" }, // this is Objective C++
{ "VALA" : "" },
{ "SQL" : "" },
{ "ECMA" : "" }
],
// Overrides the "uncrustify_config" and "uncrustify_config_by_lang" when
// the path name of document matches one of these strings or patterns.
//
// These are for advanced users, who need to apply different styles for
// different folders or projects. (However that this package now supports
// project settings files and those should be used instead. See note 2 in
// 'uncrustify_config')
// This setting can be used within project files to provide more fine grained
// control though, for example a project that uses different styles for
// different subdirectories can use this.
//
// NOTE:
// 1. The path name uses a forward slash character ("/") as its directory
// separator.
// 2. The match is performed against the absolute path of the file name,
// including the full directory.
// 3. You can use "Open Uncrustify Config - Matches Current Document" in
// Uncrustify's Package Settings to test the matching.
"uncrustify_config_by_filter" :
[
// For example:
// All files inside below folders use the custom config, others use its
// language or default config.
// { "D:/project/abc/libfoo" : "C:/cfg/foo.cfg" },
// { "D:/project/abc/src" : "C:/cfg/abc.cfg" }
],
// When uses "uncrustify_config_by_filter", the folder matching rule is...
// 0: Literal text (default), just checks if it contains the string.
// For example:
// { "abc/src/" : "C:/cfg/abc.cfg" }
// means folders like D:/abc/src/, E:/xx/myabc/src/, ...
// 1: Unix filename globbing, checks by the special pattern which uses
// *,?,[seq],[!seq],... (Also known as "wildcard characters").
// For example:
// { "*foo/src/*" : "C:/cfg/abc.cfg" }
// 2: Regular expression, er... uses the regular expression ~.~
// For example:
// { ".*abc/src/.*" : "C:/cfg/abc.cfg" }
// NOTE:
// 1. When using rule 1 or 2, a string without pattern matching characters
// must full matched exactly! It don't fall back to rule 0.
// 2. Rule 0 is case sensitive, rule 1 and 2 can be expanded to case
// insensitive pattern.
"uncrustify_filtering_rule" : 0,
// When actions on those unsupported files it will pop up a warning dialog,
// otherwise shows messages in the status bar.
"uncrustify_popup_unsupport" : true,
// Performs a format when file on save (aka Auto Format)
// CAUTIOUS:
// 1. All supported files will perform a 'format document' when saving!
// 2. It will not pop dialog for those unsupported files at this time. ('uncrustify_popup_unsupport' will override)
// 3. If somehow the Uncrustify crashes your system (before file saved), no temp backups for ALL editing files~
// 4. Recommend that only enables this parameter in a project settings file.
"uncrustify_format_on_save" : false,
}
// MEMO: About UNIX wildcards...
// See https://en.wikipedia.org/wiki/Wildcard_character
// https://en.wikipedia.org/wiki/Glob_(programming)
// Examples:
// abc ONLY 3 character name exactly.
// [abc] only 3 character name beginning with "a", "b", or "c".
// [1-9][A-Z] only 2 character name starting with a digit other than 0, and
// ending with an uppercase letter.
// [!A-Z] only 3 character name that does not begin with an uppercase
// letter.
// *e[0-9]f any file ending with "e", a single number, and "f".
// *.[ch] any file name ending in .c or .h (e.g. C source files)