|
| 1 | +@interface DidChangeConfigurationClientCapabilities begin |
| 2 | + """ |
| 3 | + Did change configuration notification supports dynamic registration. |
| 4 | +
|
| 5 | + # Tags |
| 6 | + - since - 3.6.0 to support the new pull model. |
| 7 | + """ |
| 8 | + dynamicRegistration::Union{Nothing, Bool} = nothing |
| 9 | +end |
| 10 | + |
| 11 | +@interface ConfigurationItem begin |
| 12 | + """ |
| 13 | + The scope to get the configuration section for. |
| 14 | + """ |
| 15 | + scopeUri::Union{Nothing, URI} = nothing |
| 16 | + |
| 17 | + """ |
| 18 | + The configuration section asked for. |
| 19 | + """ |
| 20 | + section::Union{Nothing, String} = nothing |
| 21 | +end |
| 22 | + |
| 23 | +@interface ConfigurationParams begin |
| 24 | + items::Vector{ConfigurationItem} |
| 25 | +end |
| 26 | + |
| 27 | +""" |
| 28 | +The `workspace/configuration` request is sent from the server to the client to |
| 29 | +fetch configuration settings from the client. The request can fetch several |
| 30 | +configuration settings in one roundtrip. The order of the returned configuration |
| 31 | +settings correspond to the order of the passed `ConfigurationItems` (e.g. the |
| 32 | +first item in the response is the result for the first configuration item in |
| 33 | +the params). |
| 34 | +
|
| 35 | +A `ConfigurationItem` consists of the configuration section to ask for and an |
| 36 | +additional scope URI. The configuration section asked for is defined by the |
| 37 | +server and doesn't necessarily need to correspond to the configuration store |
| 38 | +used by the client. So a server might ask for a configuration |
| 39 | +`cpp.formatterOptions` but the client stores the configuration in an XML store |
| 40 | +layout differently. It is up to the client to do the necessary conversion. If a |
| 41 | +scope URI is provided the client should return the setting scoped to the |
| 42 | +provided resource. If the client for example uses EditorConfig to manage its |
| 43 | +settings the configuration should be returned for the passed resource URI. If |
| 44 | +the client can't provide a configuration setting for a given scope then `null` |
| 45 | +needs to be present in the returned array. |
| 46 | +
|
| 47 | +This pull model replaces the old push model were the client signaled |
| 48 | +configuration change via an event. If the server still needs to react to |
| 49 | +configuration changes (since the server caches the result of |
| 50 | +`workspace/configuration` requests) the server should register for an empty |
| 51 | +configuration change using the following registration pattern: |
| 52 | +
|
| 53 | +```julia |
| 54 | +connection.client.register(DidChangeConfigurationNotification.type, undefined) |
| 55 | +``` |
| 56 | +
|
| 57 | +# Tags |
| 58 | +- since - 3.6.0 |
| 59 | +""" |
| 60 | +@interface ConfigurationRequest @extends RequestMessage begin |
| 61 | + method::String = "workspace/configuration" |
| 62 | + params::ConfigurationParams |
| 63 | +end |
| 64 | + |
| 65 | +@interface ConfigurationResponse @extends ResponseMessage begin |
| 66 | + result::Vector{LSPAny} |
| 67 | +end |
| 68 | + |
| 69 | +@interface DidChangeConfigurationParams begin |
| 70 | + """ |
| 71 | + The actual changed settings |
| 72 | + """ |
| 73 | + settings::LSPAny |
| 74 | +end |
| 75 | + |
| 76 | +""" |
| 77 | +A notification sent from the client to the server to signal the change of |
| 78 | +configuration settings. |
| 79 | +""" |
| 80 | +@interface DidChangeConfigurationNotification @extends NotificationMessage begin |
| 81 | + method::String = "workspace/didChangeConfiguration" |
| 82 | + params::DidChangeConfigurationParams |
| 83 | +end |
0 commit comments