forked from sublimelsp/LSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LSP.sublime-settings
429 lines (403 loc) · 12.6 KB
/
LSP.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
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
{
// Show permanent language server status in the status bar.
"show_view_status": true,
// Open and close the diagnostics panel automatically,
// depending on available diagnostics.
// Valid values are "never", "always" and "saved"
"auto_show_diagnostics_panel": "saved",
// 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_format_on_save": false,
// A dictionary of code action identifiers that should be triggered on save.
//
// Code 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.
//
// This 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).
//
// Only "source.*" actions are supported.
"lsp_code_actions_on_save": {
// "source.fixAll": true,
// "source.organizeImports": true,
},
// The amount of time the code actions on save are allowed to run for.
"code_action_on_save_timeout_ms": 2000,
// Open the diagnostics panel automatically
// when diagnostics level is equal to or less than:
// error: 1
// warning: 2
// info: 3
// hint: 4
"auto_show_diagnostics_panel_level": 2,
// Show errors and warnings count in the status bar
"show_diagnostics_count_in_view_status": false,
// Show the diagnostics description of the code
// under the cursor in status bar if available.
"show_diagnostics_in_view_status": true,
// Show highlights and gutter markers in the file views for diagnostics
// with level equal to or less than:
// none: 0
// error: 1
// warning: 2
// info: 3
// hint: 4
"show_diagnostics_severity_level": 4,
// Only show diagnostics in the panel with level equal to or less than:
// error: 1
// warning: 2
// info: 3
// hint: 4
"diagnostics_panel_include_severity_level": 4,
// 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_delay_ms": 0,
// Add an additional delay when the auto-complete widget is currently visible.
// Just like the above "diagnostics_delay_ms", the unit is milliseconds.
// The total amount of delay would be
//
// diagnostics_delay_ms + diagnostics_additional_delay_auto_complete_ms
//
// See also: "diagnostics_delay_ms".
"diagnostics_additional_delay_auto_complete_ms": 0,
// Highlighting style of code diagnostics.
// Valid values are "fill", "box", "underline", "stippled", "squiggly" or "".
// When set to the empty string (""), no diagnostics are shown in-line.
"diagnostics_highlight_style": "squiggly",
// Highlighting style of "highlights": accentuating nearby text entities that
// are related to the one under your cursor.
// Valid values are "fill", "box", "underline", "stippled", "squiggly" or "".
// When set to the empty string (""), no document highlighting is requested.
"document_highlight_style": "underline",
"document_highlight_scopes": {
"unknown": "text",
"text": "text",
"read": "markup.inserted",
"write": "markup.changed"
},
// Gutter marker for code diagnostics.
// Valid values are "dot", "circle", "bookmark", "sign" or ""
"diagnostics_gutter_marker": "dot",
// Show code actions:
// "annotation" - show an annotation on the right when code actions are available.
// "bulb" - show a bulb in the gutter when code actions are available.
// Note: 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_actions": "annotation",
// Show symbol action links in hover popup if available
"show_symbol_action_links": false,
// Disable Sublime Text's explicit and word completion.
"only_show_lsp_completions": false,
// Show symbol references in Sublime's quick panel instead of the bottom panel.
"show_references_in_quick_panel": false,
// Disable language client capabilities. Supported values:
// "hover", "completion", "colorProvider", "documentHighlight", "signatureHelp"
"disabled_capabilities": [],
// Show verbose debug messages in the sublime console.
"log_debug": false,
// Log communication from and to language servers.
// Set to an array of values:
// - "panel" - log to the LSP Language Servers output panel
// - "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.
// For 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_server": [
// "panel",
// "remote",
],
// Show language server stderr output in the Language Servers output panel.
// This output panel can be toggled from the command palette with the
// command "LSP: Toggle Log Panel".
"log_stderr": false,
// 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.
"log_max_size": 8192,
// User clients configuration can be used to
// - override single settings of "default_clients"
// - create add new user specified clients
//
// "clients":
// {
// // Each new client must have the following structure.
// "client_name":
// {
// # Must-have settings (for new clients):
//
// // The command line required to run the server.
// "command": ["pyls"],
//
// // Use: "Show Scope Name" from Sublime's Developer menu
// // This is _the_ connection between your files and language servers. It's a selector that is matched
// // against the current view's base scope. If the selector matches with the base scope of the
// // the file, the associated language server is started.
// // If the selector happens to be of the form "source.{languageId}" (which it is in many cases), then you can
// // omit this "selector" key altogether, and LSP will assume the selector is "source.{languageId}".
// // For more information, see https://www.sublimetext.com/docs/3/selectors.html
// "document_selector": "source.python",
//
// // See: https://microsoft.github.io/language-server-protocol/specification#textDocumentItem
// //
// // This key serves two purposes:
// // 1. It is sent to the language server so that it knows with what kind of file it is dealing with.
// // 2. When "selector" is not provided (see above), this is _the_ connection between your files and language
// // servers.
// //
// // In this particular example, we don't have to supply a "selector" key, because the selector for a Python file
// // is "source.python" (see above).
// "languageId": "python",
//
// // When you want to connect to the language server via TCP (on localhost), specify the port here.
// // If you put a value of 0 here, then LSP will select a free port number on localhost. In that case, you can
// // use the string templates $port or ${port} in the "command".
// // The syntax "{port}" is also allowed, but deprecated in favor of $port and ${port}.
// "tcp_port": 1234,
//
// # Optional settings (key-value pairs):
//
// // Sent to server once using workspace/didChangeConfiguration notification
// "settings": { },
//
// // Sent once to server in initialize request
// "initializationOptions": { },
//
// // Extra variables to override/add to language server's environment.
// "env": { },
// }
// }
"clients": {},
// Default clients configuration
// DO NOT MODIFY THIS SETTING!
// Use "clients" to override settings instead!
"default_clients": {
"pyls": {
"command": [
"pyls"
],
"languages": [
{
"languageId": "python"
}
],
},
"rust-analyzer": {
"command": [
"rust-analyzer"
],
"languages": [
{
"languageId": "rust"
}
],
},
"clangd": {
"command": [
"clangd"
],
"languages": [
{
"languageId": "c" // will match source.c
},
{
"document_selector": "source.c++",
"languageId": "cpp"
},
{
"document_selector": "source.objc",
"languageId": "objective-c"
},
{
"document_selector": "source.objc++",
"languageId": "objective-cpp"
},
]
},
"dart": {
"command": [
// Specify a dart command like the below in your LSP User settings.
// "dart", "/usr/local/opt/dart/libexec/bin/snapshots/analysis_server.dart.snapshot", "--lsp"
],
"languages": [
{
"languageId": "dart"
}
],
},
"elixir-ls": {
"command": [
// Specify path to language_server.sh from https://github.com/elixir-lsp/elixir-ls here
// "/home/someUser/somePlace/elixir-ls/release/language_server.sh"
],
"languages": [
{
"languageId": "elixir"
}
],
"settings": {}
},
"erlang-ls": {
"command": [
"erlang_ls",
"--transport",
"stdio"
],
"languages": [
{
"languageId": "erlang"
}
],
},
"flow": {
"command": [
"flow",
"lsp"
],
"languages": [
{
"languageId": "javascript",
"document_selector": "source.js"
}
],
},
"haskell-ide-engine": {
"command": [
"hie",
"--lsp"
],
"languages": [
{
"languageId": "haskell"
}
],
},
"ocaml": {
"command": [
"ocaml-language-server",
"--stdio"
],
"languages": [
{
"languageId": "reason"
},
{
"languageId": "ocaml"
}
],
},
"gopls": {
"command": [
"gopls"
],
"languages": [
{
"languageId": "go"
}
],
},
"jdtls": {
"command": [
"java",
"-jar",
"PATH_TO_JDT_SERVER/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar",
"-configuration",
"PATH_TO_CONFIG_DIR"
],
"languages": [
{
"languageId": "java"
}
],
},
"polymer-ide": {
"command": [
"polymer-editor-service"
],
"languages": [
{
"document_selector": "text.html.basic | source.html",
"languageId": "html"
},
{
"document_selector": "source.js",
"languageId": "javascript"
},
{
"languageId": "css" // will match source.css
},
{
"languageId": "json" // will match source.json
}
],
"settings": {
"polymer-ide.analyzeWholePackage": false,
"polymer-ide.fixOnSave": false
}
},
"ruby": {
"command": [
"solargraph",
"stdio"
],
"languages": [
{
"languageId": "ruby",
"document_selector": "source.ruby | text.html.ruby"
}
],
"initializationOptions": {
"diagnostics": false
},
},
"sorbet": {
"command": [
"srb",
"tc",
"--typed",
"true",
"--enable-all-experimental-lsp-features",
"--lsp",
"--disable-watchman"
],
"languages": [
{
"languageId": "ruby",
"document_selector": "source.ruby | text.html.ruby"
}
],
},
"rlang": {
"command": [
"R",
"--slave",
"-e",
"languageserver::run()"
],
"languages": [
{
"languageId": "r"
}
],
},
"sourcekit-lsp": {
"command": [
"xcrun",
"sourcekit-lsp"
],
"languages": [
{
"languageId": "swift"
}
],
},
}
}