forked from sublimelsp/LSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LSP.sublime-settings
402 lines (353 loc) · 16.2 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
{
// To discover more customization and example client configurations, see
// https://lsp.sublimetext.io
// Show permanent language server status in the status bar.
"show_view_status": true,
// --- Document Formatting ------------------------------------------------------------
// If supported, format the pasted text.
"lsp_format_on_paste": false,
// If supported, format a file 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,
// --- Code Actions -------------------------------------------------------------------
// 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.
// "" - don't show code actions.
"show_code_actions": "annotation",
// 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 save tasks (like code actions on save,
// formatting or WillSaveWaitUntil) are each allowed to run for.
"on_save_task_timeout_ms": 2000,
// --- Diagnostics --------------------------------------------------------------------
// Show errors and warnings count in the status bar
"show_diagnostics_count_in_view_status": false,
"show_ui_blocking_message": true, // Show UI blocking modals or the full console message and short status notification
"show_ui_blocking_err_message": true, // Show UI blocking error modals or the full console message and short status notification
// 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 (never show)
// error: 1
// warning: 2
// info: 3
// hint: 4
"show_diagnostics_severity_level": 4,
// Show diagnostics as annotations with level equal to or less than:
// none: 0 (never show)
// error: 1
// warning: 2
// info: 3
// hint: 4
// When enabled, it's recommended not to use the "annotation" value for the
// `show_code_actions` option as it's impossible to enforce which one gets shown first.
"show_diagnostics_annotations_severity_level": 0,
// Open the diagnostics panel automatically on save when diagnostics level is
// equal to or less than:
// none: 0 (never open the panel automatically)
// error: 1
// warning: 2
// info: 3
// hint: 4
"show_diagnostics_panel_on_save": 0,
// 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,
// Highlight style of code diagnostics.
// Can be a string, or a mapping of string->string for severity-based styling.
// Valid string values are "box", "underline", "stippled", "squiggly" or "".
// When set to a valid string value, all severities will use that style.
// When set to the empty string (""), no diagnostics are drawn.
// When disabled, gutter markers are still drawn, unless "diagnostics_gutter_marker"
// is set to "".
// Diagnostics which span multiple lines are always drawn with the "box" style.
// See also: "show_multiline_diagnostics_highlights".
"diagnostics_highlight_style": {
"error": "squiggly",
"warning": "squiggly",
"info": "stippled",
"hint": "stippled"
},
// Gutter marker for code diagnostics.
// Valid values are "dot", "circle", "bookmark", "sign" or ""
"diagnostics_gutter_marker": "sign",
// Show diagnostics spanning multiple lines in the view (as outlines).
// See also: "diagnostics_highlight_style".
"show_multiline_diagnostics_highlights": true,
// --- Hover popup --------------------------------------------------------------------
// The maximum number of characters (approximately) before wrapping in the popup.
"popup_max_characters_width": 120,
// The maximum number of characters (approximately) before a scrollbar appears.
"popup_max_characters_height": 1000,
// Show diagnostics in hover popup if available
"show_diagnostics_in_hover": true,
// Show code actions in hover popup if available
"show_code_actions_in_hover": true,
// Show symbol action links in hover popup if available
"show_symbol_action_links": true,
// --- Completions --------------------------------------------------------------------
// Disable Sublime Text's snippet completions.
"inhibit_snippet_completions": false,
// Disable Sublime Text's word completions. When set to `true`, this also disables
// Sublime Text's internal completion sorting algorithm and instead uses the sorting
// defined by the relevant language server.
"inhibit_word_completions": true,
// The mode used for inserting completions:
// - `insert` would insert the completion text in a middle of the word
// - `replace` would replace the existing word with a new completion text
// An LSP keybinding `lsp_commit_completion_with_opposite_insert_mode`
// can be used to insert completion using the opposite mode to the one selected here.
// Note: Must be supported by the language server.
"completion_insert_mode": "insert",
// --- Other --------------------------------------------------------------------------
// Show symbol references in Sublime's quick panel instead of the output panel.
"show_references_in_quick_panel": true,
// Show code lens:
// "annotation" - show an annotation on the right when code actions are available
// "phantom" - show a phantom on the top when code actions are available
"show_code_lens": "annotation",
// Show inlay hints in the editor. Inlay hints are short annotations within the code,
// which show variable types or parameter names.
// This is the default value used for new windows but can be overriden per-window
// using the `LSP: Toggle Inlay Hints` command from the Command Palette, Main Menu
// or a custom keybinding.
"show_inlay_hints": false,
// Highlighting style of "highlights": accentuating nearby text entities that
// are related to the one under your cursor.
// Valid values are "background", "underline", "stippled", "outline", or "".
// When set to the empty string (""), no document highlighting is requested.
// See https://lsp.sublimetext.io/customization/#document-highlights for how to
// customize the color.
"document_highlight_style": "underline",
// Show document highlights spanning multiple lines in the view (as outlines).
// See also: "document_highlight_style".
"show_multiline_document_highlights": true,
// Highlight style of the word or range for which a hover popup is shown.
// Valid values are "background", "underline", "stippled", "outline", or "".
// When set to the empty string (""), no highlighting is applied.
// See https://lsp.sublimetext.io/customization/#hover-highlights for how to
// customize the color.
"hover_highlight_style": "",
// Highlight style of links to internal or external resources, like another text
// document or a web site. Link navigation is implemented via the popup on mouse hover.
// Valid values are:
// "underline"
// "none" - disables special highlighting, but still allows to navigate links in the
// hover popup
// "disabled" - disables highlighting and the hover popup for links
// Note that depending on the syntax and color scheme, some internet URLs may still be
// underlined via regular syntax highlighting.
"link_highlight_style": "underline",
// Enable semantic highlighting in addition to standard syntax highlighting.
// Note: Must be supported by the language server and also requires a special rule in
// the color scheme to work. If you use none of the built-in color schemes from Sublime
// Text then see the documentation at
// https://lsp.sublimetext.io/customization/#semantic-highlighting for a description
// about how to configure your color scheme for semantic highlighting.
"semantic_highlighting": false,
// Determines ranges which initially should be folded when a document is opened,
// provided that the language server has support for this.
"initially_folded": [
// "comment",
// "imports",
// "region",
],
// Controls if files that were part of a refactoring (e.g. rename) are saved automatically:
// "always" - save all affected files
// "preserve" - only save files that didn't have unsaved changes beforehand
// "preserve_opened" - only save opened files that didn't have unsaved changes beforehand
// and open other files that were affected by the refactoring
// "never" - never save files automatically
"refactoring_auto_save": "never",
// --- Debugging ----------------------------------------------------------------------
// 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 Log 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",
],
// 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,
// --- Server Configurations ----------------------------------------------------------
// NOTE: Instead of manually configuring the servers, consider using one of the
// existing helper packages for the language of your choice. The full list of
// those is available at https://lsp.sublimetext.io/language_servers/
//
//
// User server configurations can be used to:
// - partially override a configuration in the "default_clients", or
// - create new configurations.
//
// It is **highly recommended** to download the LSP-json helper package. This
// is a package that auto-installs a JSON language server that will provide
// auto-completions for all keys in this file, and many others as well.
// See: https://packagecontrol.io/packages/LSP-json
//
// "clients":
// {
// // Each new server configuration must have the following structure.
// "CLIENT_NAME": // some human-friendly name
// {
// # ----------- The following three settings are **required** -----------
//
// // Enable or disable this client configuration.
// "enabled": true,
//
// // The command line required to run the server.
// "command": ["pyls"],
//
// // This selector filters which views apply to this configuration, in
// // the same way that a selector for a build system filters which build
// // system applies to which view. 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.
// "selector": "source.python",
//
// # ------ From this point onward, each key-value is **optional** -------
//
// // 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_. Other URI schemes exist, but require different
// // considerations for different language servers. If 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.
// "schemes": ["file", "buffer", "res"],
//
// // 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,
//
// // Sent to server once using workspace/didChangeConfiguration
// // notification
// "settings": { },
//
// // Sent once to server in initialize request
// "initializationOptions": { },
//
// // Disable providers if so desired
// "disabled_capabilities": { },
//
// // Extra variables to override/add to language server's environment.
// "env": { },
//
// // Sets the diagnostics mode:
// // "open_files" - All diagnostics reported from the server are shown.
// // If the server supports `diagnosticProvider`, diagnostics are
// // requested only for files which are opened in the editor and they
// // are cleared when the file gets closed.
// // "workspace" - If there are project folders (folders in the side bar),
// // diagnostics for files not within those folders are ignored.
// // If the server supports `diagnosticProvider.workspaceDiagnostics`,
// // diagnostics are requested for all files in the project folders.
// "diagnostics_mode": "open_files",
// }
// }
"clients": {},
// Default clients configuration
// DO NOT MODIFY THIS SETTING!
// Use "clients" to override settings instead!
"default_clients": {
"erlang-ls": {
"command": [
"erlang_ls",
"--transport",
"stdio"
],
"selector": "source.erlang",
},
"ocaml": {
"command": [
"ocaml-language-server",
"--stdio"
],
"selector": "source.reason | source.ocaml",
},
"polymer-ide": {
"command": [
"polymer-editor-service"
],
"selector": "text.html.basic | source.html | source.js | source.css | source.json",
"settings": {
"polymer-ide.analyzeWholePackage": false,
"polymer-ide.fixOnSave": false
}
},
"ruby": {
"command": [
"solargraph",
"stdio"
],
"selector": "source.ruby | text.html.ruby",
"initializationOptions": {
"diagnostics": false
},
},
"sorbet": {
"command": [
"srb",
"tc",
"--typed",
"true",
"--enable-all-experimental-lsp-features",
"--lsp",
"--disable-watchman"
],
"selector": "source.ruby | text.html.ruby",
},
}
}