-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
schema.json
241 lines (241 loc) · 7.82 KB
/
schema.json
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
{
"$schema": "http://json-schema.org/draft-04/schema",
"additionalProperties": false,
"description": "If configuring via `DidChangeConfiguration` (e.g. an editor API such as `nvim-lspconfig`), all properties should be in camelCase instead of kebab-case.",
"definitions": {
"command-definition": {
"description": "list of commands",
"items": {
"additionalProperties": false,
"properties": {
"arguments": {
"description": "arguments for the command",
"items": {
"type": "string"
},
"type": "array"
},
"command": {
"description": "command to execute",
"type": "string"
},
"os": {
"description": "command executable OS environment",
"type": "string"
},
"title": {
"description": "title for clients",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"tool-definition": {
"additionalProperties": false,
"description": "definition of the tool",
"properties": {
"prefix": {
"description": "If `lint-source` doesn't work, you can set a prefix here instead, which will render the messages as \"[prefix] message\".",
"type": "string"
},
"format-can-range": {
"description": "Whether the formatting command handles range start and range end",
"type": "boolean"
},
"format-command": {
"description": "Formatting command. Input filename can be injected using `${INPUT}`, and flags can be injected using `${--flag:key}` (adds `--flag <value>` if value exists for key), `${--flag=key}` (adds `--flag=<value>` if value exists for key), or `${--flag:!key}` (adds `--flag` if value for key is falsy).\n\n`efm-langserver` may provide values for keys `charStart`, `charEnd`, `rowStart`, `rowEnd`, `colStart`, `colEnd`, or any key in [`interface FormattingOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions).\n\nExample: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}`",
"type": "string"
},
"format-stdin": {
"description": "use stdin for the format",
"type": "boolean"
},
"hover-command": {
"description": "hover command",
"type": "string"
},
"hover-stdin": {
"description": "use stdin for the hover",
"type": "boolean"
},
"hover-type": {
"description": "hover result type",
"type": "string",
"enum": [
"markdown",
"plaintext"
]
},
"hover-chars": {
"type": "string"
},
"env": {
"description": "command environment variables and values",
"items": {
"type": "string",
"pattern": "^.+=.+$"
},
"type": "array"
},
"lint-command": {
"description": "Lint command. Input filename can be injected using `${INPUT}`.",
"type": "string"
},
"lint-offset-columns": {
"description": "offset value to skip columns",
"type": "number"
},
"lint-category-map": {
"description": "Map linter categories to LSP categories",
"type": "object"
},
"lint-formats": {
"description": "List of Vim errorformats to capture. See: https://vimhelp.org/quickfix.txt.html#errorformats. If this is not expressive enough, you can edit the `lint-command` to do some preprocessing, e.g. using `sed` or `jq`.\n\n`efm-langserver` uses a Go implementation to parse the errors, which comes with a CLI for quick testing: https://github.com/reviewdog/errorformat",
"items": {
"type": "string"
},
"type": "array"
},
"lint-ignore-exit-code": {
"default": true,
"description": "ignore exit code of lint",
"type": "boolean"
},
"lint-offset": {
"description": "offset value to skip lines",
"type": "number"
},
"lint-after-open": {
"default": true,
"description": "lint after open",
"type": "boolean"
},
"lint-on-save": {
"description": "only lint on save, i.e. don't lint on text changed",
"type": "boolean"
},
"lint-severity": {
"description": "default severity to show if violation doesn't provide severity. 1 = error, 2 = warning, 3 = info, 4 = hint",
"type": "number"
},
"lint-source": {
"description": "show where the lint came from, e.g. 'eslint'",
"type": "string"
},
"lint-stdin": {
"default": true,
"description": "use stdin for the lint",
"type": "boolean"
},
"lint-workspace": {
"description": "indicates that the command lints the whole workspace and thus doesn't need a filename argument nor stdin",
"type": "boolean"
},
"completion-command": {
"description": "completion command",
"type": "string"
},
"completion-stdin": {
"default": true,
"description": "use stdin for the completion",
"type": "boolean"
},
"symbol-command": {
"type": "string"
},
"symbol-stdin": {
"type": "boolean"
},
"symbol-formats": {
"items": {
"type": "string"
},
"type": "array"
},
"root-markers": {
"description": "markers to find root directory",
"items": {
"type": "string"
},
"type": "array"
},
"require-marker": {
"description": "require a marker to run linter",
"type": "boolean"
},
"commands": {
"$ref": "#/definitions/command-definition"
}
},
"type": "object"
}
},
"properties": {
"commands": {
"$ref": "#/definitions/command-definition"
},
"languages": {
"description": "list of language",
"patternProperties": {
"^([a-z0-9_-]+)+$": {
"items": {
"$ref": "#/definitions/tool-definition"
},
"type": "array"
}
}
},
"tools": {
"description": "definition of tools",
"patternProperties": {
"^([a-z0-9_-]+)+$": {
"$ref": "#/definitions/tool-definition"
}
},
"type": "object"
},
"version": {
"description": "version of this yaml format",
"type": "number"
},
"root-markers": {
"description": "markers to find root directory",
"items": {
"type": "string"
},
"type": "array"
},
"log-file": {
"description": "(YAML only) path to log file",
"type": "string"
},
"log-level": {
"description": "log level",
"minimum": 1,
"type": "number"
},
"format-debounce": {
"description": "duration to debounce calls to the formatter executable. e.g: 1s",
"type": "string"
},
"lint-debounce": {
"description": "duration to debounce calls to the linter executable. e.g.: 1s",
"type": "string"
},
"provide-definition": {
"description": "(YAML only) Whether this language server should be used for go-to-definition requests",
"type": "boolean"
},
"trigger-chars": {
"description": "trigger characters for completion",
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "efm-langserver",
"type": "object"
}