-
Notifications
You must be signed in to change notification settings - Fork 3
/
RustFmt.sublime-settings
79 lines (58 loc) · 2.1 KB
/
RustFmt.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
{
/*
Executable with zero or more arguments.
When modifying this setting, ensure that the executable expects to
communicate over standard input/output.
For versions of `rustfmt` prior to 0.8.0, use:
"executable": ["rustfmt", "--write-mode", "display"]
To tell `rustfmt` to use the 2018 edition globally, use:
"executable": ["rustfmt", "--edition", "2018"]
*/
"executable": ["rustfmt"],
/*
Additional environment variables for the subprocess. Environment is always
inherited from Sublime Text, which generally tries to mimic your shell env.
This is needed only for additional variables and overrides.
*/
"env": null,
/*
Format current buffer on save. Enabled by default.
Note that you can format the buffer manually via the "RustFmt: Format Buffer"
command.
*/
"format_on_save": true,
/*
Compatibility mode for versions of `rustfmt` prior to 0.8.0. Equivalent to:
"executable": ["rustfmt", "--write-mode", "display"]
*/
"legacy_write_mode_option": false,
/*
Whether to search for `rustfmt.toml` in the file's directory and its
ancestors. For anonymous buffers, "current directory" will be guessed from
the current window.
*/
"use_config_path": true,
/*
Determines the CWD of the subprocess. Possible values:
- "auto" -- try to use the current file's directory; fall back on
the project root, which is assumed to be the first directory in the
current window
- "project_root" -- use the project root, which is assumed to be the first
directory in the current window
- "none" -- don't set the CWD
- ":<path>" -- use hardcoded path; may be useful for project-specific
settings
*/
"cwd_mode": "auto",
/*
Show errors from `rustfmt` as popups. Enabled by default.
*/
"error_messages": true,
/*
Determines how to replace the contents of the current buffer with the
formatted output. Possible values:
- "diff": -- more complicated but better at preserving cursor position
- "replace": -- simpler but doesn't preserve cursor position
*/
"merge_type": "diff"
}