1 use serde
::{Deserialize, Serialize}
;
6 #[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
7 #[serde(rename_all = "camelCase")]
8 pub struct WorkspaceFoldersServerCapabilities
{
9 /// The server has support for workspace folders
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub supported
: Option
<bool
>,
13 /// Whether the server wants to receive workspace folder
14 /// change notifications.
16 /// If a string is provided, the string is treated as an ID
17 /// under which the notification is registered on the client
18 /// side. The ID can be used to unregister for these events
19 /// using the `client/unregisterCapability` request.
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub change_notifications
: Option
<OneOf
<bool
, String
>>,
24 #[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
25 #[serde(rename_all = "camelCase")]
26 pub struct WorkspaceFolder
{
27 /// The associated URI for this workspace folder.
29 /// The name of the workspace folder. Defaults to the uri's basename.
33 #[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
34 #[serde(rename_all = "camelCase")]
35 pub struct DidChangeWorkspaceFoldersParams
{
36 /// The actual workspace folder change event.
37 pub event
: WorkspaceFoldersChangeEvent
,
40 /// The workspace folder change event.
41 #[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
42 #[serde(rename_all = "camelCase")]
43 pub struct WorkspaceFoldersChangeEvent
{
44 /// The array of added workspace folders
45 pub added
: Vec
<WorkspaceFolder
>,
47 /// The array of the removed workspace folders
48 pub removed
: Vec
<WorkspaceFolder
>,