/
Fmt.sublime-settings
118 lines (87 loc) · 3.35 KB
/
Fmt.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
{
/*
Formatting rules should be added here. (In your own settings file.)
Every rule is a dictionary, where the only required field is "selector":
a syntax type such as "source.python". See the docs on selectors:
https://www.sublimetext.com/docs/selectors.html. All other fields are
overrides for global settings such as "cmd".
Example for Go:
"rules": [
{
"selector": "source.go",
"cmd": ["goimports"],
"format_on_save": true,
"merge_type": "diff",
},
],
*/
"rules": [],
/*
Command to invoke, with command line arguments. Must be a list of strings.
The command must communicate over standard input/output.
While technically this can be set at the top level, in practice you should
set this PER SELECTOR in the "rules" setting, using different fmters for
different scopes.
Supports variable substitution, using the shell variable interpolation
syntax:
"cmd": ["some_command", "$tab_size"]
Supported variables:
- Environment variables via `os.environ`.
- Special variables available in build systems:
https://www.sublimetext.com/docs/build_systems.html.
- $tab_size -- Indent width, usually 2 or 4; takes the "tab_size" setting
from the current view.
- $indent -- Literal indent: either N spaces or a single tab.
*/
"cmd": null,
/*
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.
Can be configured per rule / per selector.
*/
"env": null,
/*
Format current buffer on save. Disabled by default. Can be overridden for
individual scope selectors.
Note that you can format the buffer manually via the "Fmt: Format Buffer"
command. You can also format selection via the `Fmt: Format Selection`
command.
*/
"format_on_save": false,
/*
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",
/*
How to show errors. Possible values:
- "" -- Hide errors completely.
- "console" -- Print errors to the Sublime console.
- "panel" -- Show an output panel at the bottom.
- "popup" -- Show obnoxious popup windows.
*/
"error_style": "panel",
/*
Determines how to replace buffer contents. Can be overridden for individual
scope selectors. "diff" is more precise and preserves scroll and cursor
position, but can be EXTREMELY slow when the number of changes exceeds a few
dozen.
Possible values:
- "replace" -- Simpler but doesn't preserve cursor position.
- "diff" -- More complicated but better at preserving cursor position.
*/
"merge_type": "replace",
/*
Subprocess timeout in seconds. If execution takes longer, Fmt kills the
subprocess and aborts with an error.
*/
"timeout": 60,
}