forked from sublimelsp/LSP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sublime-package.json
590 lines (590 loc) · 29.7 KB
/
sublime-package.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
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
{
"contributions": {
"settings": [
{
"schema": {
"$id": "sublime://settings/LSP",
"definitions": {
// User preferences that are shared with "Preferences.sublime-settings"
"lsp_format_on_save": {
"type": "boolean",
"default": false,
"markdownDescription": "Run the server's formatProvider (if supported) on a document before saving. This option is also supported in syntax-specific settings and/or in the `\"settings\"` section of project files."
},
"lsp_code_actions_on_save": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"propertyNames": {
"pattern": "^source\\."
},
"markdownDescription": "A dictionary of code action identifiers that should be triggered on save.\n\nCode action identifiers are not officially standardized so refer to specific server's documentation on what is supported but `source.fixAll` is commonly used to apply fix-on-save code actions.\n\nThis option is also supported in syntax-specific settings and/or in the `\"settings\"` section of project files. Settings from all those places will be merged and more specific (syntax and project) settings will override less specific (from LSP or Sublime settings).\n\nOnly \"source.*\" actions are supported."
},
// Deprecated syntaxes and scopes
"useSelectorInstead": {
"type": "string",
"deprecationMessage": "Use the \"selector\" key instead."
},
"FileWatcher": {
"type": "object",
"examples": [
{
"patterns": ["{**/*.js,**/*.ts,**/*.json}"],
}
],
"additionalProperties": false,
"required": ["patterns"],
"properties": {
"patterns": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"create",
"change",
"delete"
]
},
"uniqueItems": true
},
"ignores": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
},
"ClientCommand": {
"type": "array",
"default": [
"path/to/language-server-binary",
"--some-option"
],
"items": {
"type": "string"
},
"markdownDescription": "The command to start the language server."
},
"ClientEnabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether this configuration is enabled or disabled."
},
"ClientAutoCompleteSelector": {
"type": "string",
"markdownDescription": "When specified, this [selector](https://www.sublimetext.com/docs/3/selectors.html) is used as the `\"selector\"` key in an entry of the `\"auto_complete_triggers\"` of the view applicable to this configuration. You don't have to necessarily provide this value. Because your language server registers so-called trigger characters in any case. However, this selector allows you to fine-tune the auto-complete behavior if the registered trigger characters of the language server result in an unpleasent auto-complete experience. Note that the behavior of this selector will depend on the .sublime-syntax in use.\n\nThis value is _not_ applied to the **global** `\"auto_complete_selector\"` setting of the view."
},
"ClientIgnoreServerTriggerChars": {
"type": "boolean",
"default": false,
"deprecationMessage": "Use disabled_capabilities instead: \"disabled_capabilities\": {\"completionProvider\": {\"triggerCharacters\": true}}"
},
"ClientInitializationOptions": {
"type": "object",
"markdownDescription": "The initializationOptions that are passed to the language server process during the _initialize_ phase. This is a rather free-form dictionary of key-value pairs and is different per language server. Look up documentation of your specific langauge server to see what the possible key-value pairs can be."
},
"ClientSettings": {
"type": "object",
"markdownDescription": "The server settings. This is a rather free-form dictionary of key-value pairs and is different per language server. Look up documentation of your specific langauge server to see what the possible key-value pairs can be."
},
"ClientExperimentalCapabilities": {
"type": "object",
"markdownDescription": "Experimental capabilities that are passed to the language server process during the _initialize_ phase. This is different per language server, so you'll need to look up documentation for your particular language server."
},
"ClientDisabledCapabilities": {
"type": "object",
"markdownDescription": "A dictionary that \"masks\" (disables) the capabilities registered by this language server. For instance, to disable completions, use `{\"completionProvider\": true}`. To disable hover info, use `{\"hoverProvider\": true}`. Multiple providers can be disabled. To disable a subset of a provider, use a nested dictionary. For intance, to disable only the trigger characters of a language server, but not the completion functionality itself, use `{\"completionProvider\": {\"triggerCharacters\": true}}`.\n\nTo figure out exactly which _provider_ you need to disable here is an advanced topic. You'll have to study the official specification to see what particular providers exist. Here are a few common provider names that might do what you want:\n\n- hoverProvider\n- completionProvider\n- colorProvider\n- documentHighlightProvider\n- signatureHelpProvider\n- codeLensProvider\n- codeActionProvider"
},
"ClientEnv": {
"type": "object",
"markdownDescription": "Specify environment variables to pass to the language server process on startup.",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"markdownDescription": "The value for this environment variable."
},
{
"type": "array",
"markdownDescription": "A list of values. The list will be joined into a string with your native file system's path separator. For example, `[\"a\", \"b\"]` will turn into `\"a;b\"` on Windows.",
"items": {
"type": "string"
}
}
]
}
},
"ClientSelector": {
// \u00A0 is used as a workaround for https://github.com/sublimehq/sublime_text/issues/3373
"markdownDescription": "A [selector](https://www.sublimetext.com/docs/3/selectors.html) that defines to which views this language server should be attached, in the same way that a selector for a [Build\u00A0System](https://www.sublimetext.com/docs/3/build_systems.html) is used to filter the Build System to particular views. The selector is matched against the base scope of the syntax of the view. If the selector matches with the base scope of the the file, the associated language server is started. To determine the base scope of your view, click on Tools > Developer > Show Scope Name. The first line in the popup is the base scope.",
"type": "string",
},
"ClientSchemes": {
"markdownDescription": "An optional list of URI schemes which this client configuration should attach to. A well-known URI scheme is the `file` scheme. The scheme `buffer` is used as in-memory scratch buffer (that is when you create a new unsaved tab). Furthermore, the scheme `res` is used to denote Sublime Text resource files inside .sublime-package files, viewable with the _View Package File_ command from the _Command Palette_.\n\nOther URI schemes exist, but require different considerations for different language servers.\n\nIf this setting is not specified, then only the `file` scheme is used, meaning that this client configuration will only attach to views that are backed by a file on disk.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"defaultSnippets": [
{
"body": [
"${1:file}"
]
}
]
},
"ClientPrioritySelector": {
"markdownDescription": "While the `\"selector\"` is used to determine which views belong to which language server configuration, the `\"priority_selector\"` is used to determine which language server wins at the caret position in case there are multiple language servers attached to a view. For instance, there can only be one signature help popup visible at any given time. This selector is use to decide which one to use for such capabilities. This setting is optional and you won't need to set it if you're planning on using a single language server for a particular type of view."
},
// The ClientConfig class
"ClientConfig": {
"type": "object",
"additionalProperties": false,
"markdownDescription": "The configuration that informs LSP on how to start your language server and to which views it should attach the language server process",
"properties": {
"command": {
"$ref": "sublime://settings/LSP#/definitions/ClientCommand"
},
"enabled": {
"$ref": "sublime://settings/LSP#/definitions/ClientEnabled"
},
"file_watcher": {
"$ref": "sublime://settings/LSP#/definitions/FileWatcher"
},
"tcp_port": {
"type": "integer",
"minimum": 0,
"default": 0,
"markdownDescription": "When specified, the TCP port to use to connect to the language server process. If not specified, STDIO is used as the transport. When set to zero, a free TCP port is chosen. You can use that free TCP port number as a template variable, i.e. as `${tcp_port}` in the `\"command\"`."
},
"auto_complete_selector": {
"$ref": "#/definitions/ClientAutoCompleteSelector"
},
"ignore_server_trigger_chars": {
"$ref": "#/definitions/ClientIgnoreServerTriggerChars"
},
"selector": {
"$ref": "#/definitions/ClientSelector"
},
"schemes": {
"$ref": "#/definitions/ClientSchemes"
},
"priority_selector": {
"$ref": "#/definitions/ClientPrioritySelector",
},
"initializationOptions": {
"$ref": "#/definitions/ClientInitializationOptions"
},
"settings": {
"$ref": "#/definitions/ClientSettings"
},
"experimental_capabilities": {
"$ref": "#/definitions/ClientExperimentalCapabilities"
},
"disabled_capabilities": {
"$ref": "#/definitions/ClientDisabledCapabilities"
},
"env": {
"$ref": "#/definitions/ClientEnv"
},
"languageId": {
"$ref": "#/definitions/useSelectorInstead"
},
"document_selector": {
"$ref": "#/definitions/useSelectorInstead"
},
"feature_selector": {
"$ref": "#/definitions/useSelectorInstead"
},
"syntaxes": {
"type": "array",
"$ref": "#/definitions/useSelectorInstead"
},
"scopes": {
"type": "array",
"$ref": "#/definitions/useSelectorInstead"
},
"languages": {
"type": "array",
"$ref": "#/definitions/useSelectorInstead"
}
}
}
}
}
},
{
"file_patterns": [
"/LSP.sublime-settings"
],
"schema": {
"properties": {
"show_view_status": {
"type": "boolean",
"default": true,
"markdownDescription": "Show permanent language server status in the status bar."
},
"auto_show_diagnostics_panel": {
"oneOf": [
{
"enum": [
"never",
"always",
"saved"
]
},
{
"type": "boolean",
"deprecationMessage": "Use an array instead."
}
],
"default": "saved",
"deprecationMessage": "Use the \"show_diagnostics_panel_on_save\" setting instead."
},
"code_action_on_save_timeout_ms": {
"type": "integer",
"default": 2000,
"deprecationMessage": "Use the \"on_save_task_timeout_ms\" setting instead."
},
"on_save_task_timeout_ms": {
"type": "integer",
"default": 2000,
"markdownDescription": "The amount of time the save tasks (like code actions on save, formatting or WillSaveWaitUntil) are each allowed to run for."
},
"show_diagnostics_panel_on_save": {
"type": "integer",
"minimum": 0,
"maximum": 4,
"default": 2,
"markdownDescription": "Open the diagnostics panel automatically **on save** when diagnostics level is equal to or less than:\n\n- _none_: `0` (this means never show the panel automatically),\n- _error_: `1`,\n- _warning_: `2`,\n- _info_: `3`,\n- _hint_: `4`\n\nThe panel is not shown when there is already another panel open. The panel is never _closed_ automatically. To close the panel, press the <kbd>Esc</kbd> key."
},
"show_diagnostics_count_in_view_status": {
"type": "boolean",
"default": false,
"markdownDescription": "Show errors and warnings count in the status bar."
},
"lsp_format_on_save": {
"$ref": "sublime://settings/LSP#/definitions/lsp_format_on_save"
},
"lsp_code_actions_on_save": {
"$ref": "sublime://settings/LSP#/definitions/lsp_code_actions_on_save",
},
"show_diagnostics_in_view_status": {
"type": "boolean",
"default": true,
"markdownDescription": "Show the diagnostics description of the code under the cursor in status bar if available."
},
"show_diagnostics_severity_level": {
"type": "integer",
"default": 4,
"minimum": 0,
"maximum": 4,
"markdownDescription": "Show highlights and gutter markers in the file views for diagnostics with level equal to or less than:\n\n- _none_: `0`,\n- _error_: `1`,\n- _warning_: `2`,\n- _info_: `3`,\n- _hint_: `4`"
},
"diagnostics_panel_include_severity_level": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"default": 4,
"markdownDescription": "Only show diagnostics in the panel with level equal to or less than:\n\n- _error_: `1`,\n- _warning_: `2`,\n- _info_: `3`,\n- _hint_: `4`"
},
"diagnostics_delay_ms": {
"type": "integer",
"default": 0,
"minimum": 0,
"markdownDescription": "Delay showing diagnostics by this many milliseconds. The delay will only kick into action when previously there were no diagnostics in the view. If there were previous diagnostics in the view, then the delay setting here is ignored and diagnostics are updated immediately."
},
"diagnostics_additional_delay_auto_complete_ms": {
"type": "integer",
"default": 0,
"minimum": 0,
"markdownDescription": "Add an additional delay when the auto-complete widget is currently visible. Just like `\"diagnostics_delay_ms\"`, the unit is milliseconds. The total amount of delay would be `diagnostics_delay_ms + diagnostics_additional_delay_auto_complete_ms`."
},
"diagnostics_highlight_style": {
"oneOf": [
{
"enum": ["box", "underline", "stippled", "squiggly", ""],
},
{
"type": "object",
"properties": {
"error": {
"enum": ["box", "underline", "stippled", "squiggly", ""],
"default": "squiggly"
},
"warning": {
"enum": ["box", "underline", "stippled", "squiggly", ""],
"default": "squiggly"
},
"info": {
"enum": ["box", "underline", "stippled", "squiggly", ""],
"default": "stippled"
},
"hint": {
"enum": ["box", "underline", "stippled", "squiggly", ""],
"default": "stippled"
},
},
"additionalProperties": false
}
],
"default": {
"error": "squiggly",
"warning": "squiggly",
"info": "stippled",
"hint": "stippled"
},
"markdownDescription": "Highlight style of code diagnostics.\nCan be a string, or a mapping of string->string for severity-based styling.\nValid string values are `\"box\"`, `\"underline\"`, `\"stippled\"`, `\"squiggly\"` or the empty string (`\"\"`).\nWhen set to a valid string value, all severities will use that style.\nWhen set to the empty string (`\"\"`), no diagnostics are drawn.\nWhen disabled, gutter markers are still drawn, unless `\"diagnostics_gutter_marker\"` is set to `\"\"`.\nDiagnostics which span multiple lines are always drawn with the `box` style (See `\"show_multiline_diagnostics_highlights\"`)."
},
"document_highlight_style": {
"enum": [
"fill",
"underline",
"stippled",
""
],
"default": "underline",
"markdownDescription": "Highlighting style of `\"highlights\"`: accentuating nearby text entities that are related to the one under your cursor. When set to the empty string (`\"\"`), no diagnostics are shown in-line."
},
"diagnostics_gutter_marker": {
"enum": [
"dot",
"circle",
"bookmark",
"sign",
""
],
"default": "dot",
"markdownDescription": "Gutter marker for code diagnostics."
},
"semantic_highlighting": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable semantic highlighting in addition to standard syntax highlighting."
},
"show_code_actions": {
"enum": [
"annotation",
"bulb",
""
],
"enumDescriptions": [
"Show code actions to right as a clickable bluish annotation.",
"Show code actions in the gutter as a light bulb.",
"Do not show code actions."
],
"default": "annotation",
"markdownDescription": "Where to show `\"code actions\"`. Due to API limitations, the `\"bulb\"` icon can not be clicked so the code actions can only be triggered using a keyboard shortcut or the context menu."
},
"show_code_lens": {
"enum": [
"annotation",
"phantom"
],
"enumDescriptions": [
"Show code lens to right as a clickable greenish annotation.",
"Show code lens as a phantom."
],
"default": "annotation",
"markdownDescription": "Where to show `\"code lens\"`."
},
"show_code_actions_in_hover": {
"type": "boolean",
"default": true,
"markdownDescription": "Show code actions in hover popup if available."
},
"show_diagnostics_highlights": {
"type": "boolean",
"deprecationMessage": "Use \"diagnostics_highlight_style\" instead",
},
"show_multiline_diagnostics_highlights": {
"type": "boolean",
"default": true,
"markdownDescription": "Show diagnostics spanning multiline diagnostics (as outlines) in the view. See also: `\"diagnostics_highlight_style\"`."
},
"show_symbol_action_links": {
"type": "boolean",
"default": true,
"markdownDescription": "Show symbol action links in hover popup if available."
},
"only_show_lsp_completions": {
"type": "boolean",
"default": false,
"deprecationMessage": "This setting is deprecated. Use a combination of \"inhibit_snippet_completions\" and \"inhibit_word_completions\" instead."
},
"inhibit_snippet_completions": {
"type": "boolean",
"default": false,
"markdownDescription": "Disable Sublime Text's (and your own) snippet completions. Note that your language server may still provide completion items of the \"snippet\" kind."
},
"inhibit_word_completions": {
"type": "boolean",
"default": true,
"markdownDescription": "Disable Sublime Text's word completions. \"word\" completion means Sublime Text's internal completer that takes words from the current buffer you're editing and presents them in the auto-complete widget."
},
"show_references_in_quick_panel": {
"type": "boolean",
"default": false,
"markdownDescription": "Show symbol references in Sublime's quick panel instead of the bottom panel."
},
"popup_max_characters_width": {
"type": "integer",
"default": 120,
"minimum": 1,
"description": "The maximum number of characters (approximately) before wrapping in the popup."
},
"popup_max_characters_height": {
"type": "integer",
"default": 1000,
"minimum": 1,
"description": "The maximum number of characters (approximately) before a scrollbar appears."
},
"disabled_capabilities": {
"type": "array",
"uniqueItems": true,
"minItems": 0,
"deprecationMessage": "Instead of a global option, this option is now on a per-client basis. Moreover, this is now an object instead of an array."
},
"log_debug": {
"type": "boolean",
"default": false,
"markdownDescription": "Show verbose debug messages in the sublime console."
},
"log_server": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"panel",
"remote",
]
},
"uniqueItems": true,
"minItems": 0
},
{
"type": "boolean",
"deprecationMessage": "Use an array instead."
}
],
"markdownDescription": "Log communication from and to language servers. Possible flags:\n\n- `\"panel\"`: log to the LSP Language Servers output panel\n- `\"remote\"`: start a local websocket server on port 9981. Can be connected to with a websocket client to receive the log messages in real time.\n\nFor backward-compatibility, when set to `true`, enables the `\"panel\"` logger and when set to `false` disables logging. This output panel can be toggled from the command palette with the command **LSP: Toggle Log Panel**."
},
"log_max_size": {
"type": "integer",
"default": 8192,
"minimum": 0,
"markdownDescription": "When logging to the `\"panel\"` (see `\"log_server\"`), if the params of the request or response or notification exceed this many characters, then print a `<snip>` to the panel instead. If you don't want a limit, set this to zero."
},
"clients": {
"additionalProperties": {
"$ref": "sublime://settings/LSP#/definitions/ClientConfig"
},
"markdownDescription": "The dictionary of your configured language servers. The keys of this dictionary are free-form. They give a humany-friendly name to the server configuration. They are shown in the bottom-left corner in the status bar once attached to a view (unless you have `\"show_view_status\"` set to `false`)."
},
"default_clients": {
"additionalProperties": {
"$ref": "sublime://settings/LSP#/definitions/ClientConfig"
},
"markdownDescription": "**DO NOT MODIFY THIS SETTING!** Use `\"clients\"` to override settings instead!",
}
},
"additionalProperties": false
}
},
{
"file_patterns": [
"/Preferences.sublime-settings"
],
"schema": {
"properties": {
"lsp_format_on_save": {
"$ref": "sublime://settings/LSP#/definitions/lsp_format_on_save",
},
"lsp_code_actions_on_save": {
"$ref": "sublime://settings/LSP#/definitions/lsp_code_actions_on_save"
}
}
}
},
{
"file_patterns": [
"/*.sublime-project"
],
"schema": {
"properties": {
"settings": {
"properties": {
"LSP": {
"type": "object",
"markdownDescription": "The dictionary of your configured language servers or overrides for existing configurations. The keys of this dictionary are free-form. They give a humany-friendly name to the server configuration. They are shown in the bottom-left corner in the status bar once attached to a view (unless you have `\"show_view_status\"` set to `false`).",
"additionalProperties": {
"$ref": "sublime://settings/LSP#/definitions/ClientConfig"
}
}
}
}
}
}
},
{
"schema": {
"$id": "sublime://settings/LSP-plugin-base",
"properties": {
"command": {
"$ref": "sublime://settings/LSP#/definitions/ClientCommand"
},
"enabled": {
"$ref": "sublime://settings/LSP#/definitions/ClientEnabled"
},
"file_watcher": {
"$ref": "sublime://settings/LSP#/definitions/FileWatcher"
},
"selector": {
"$ref": "sublime://settings/LSP#/definitions/ClientSelector"
},
"schemes": {
"$ref": "sublime://settings/LSP#/definitions/ClientSchemes"
},
"priority_selector": {
"$ref": "sublime://settings/LSP#/definitions/ClientPrioritySelector"
},
"initializationOptions": {
"$ref": "sublime://settings/LSP#/definitions/ClientInitializationOptions"
},
"settings": {
"$ref": "sublime://settings/LSP#/definitions/ClientSettings"
},
"experimental_capabilities": {
"$ref": "sublime://settings/LSP#/definitions/ClientExperimentalCapabilities"
},
"disabled_capabilities": {
"$ref": "sublime://settings/LSP#/definitions/ClientDisabledCapabilities"
},
"env": {
"$ref": "sublime://settings/LSP#/definitions/ClientEnv"
},
"auto_complete_selector": {
"$ref": "sublime://settings/LSP#/definitions/ClientAutoCompleteSelector"
},
"ignore_server_trigger_chars": {
"$ref": "sublime://settings/LSP#/definitions/ClientIgnoreServerTriggerChars"
}
}
}
}
]
}
}