|
@@ -1514,6 +1514,114 @@ struct SignatureHelp {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * A pattern to describe in which file operation requests or notifications
|
|
|
+ * the server is interested in.
|
|
|
+ */
|
|
|
+struct FileOperationPattern {
|
|
|
+ /**
|
|
|
+ * The glob pattern to match.
|
|
|
+ */
|
|
|
+ String glob = "**/*.gd";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Whether to match `file`s or `folder`s with this pattern.
|
|
|
+ *
|
|
|
+ * Matches both if undefined.
|
|
|
+ */
|
|
|
+ String matches = "file";
|
|
|
+
|
|
|
+ Dictionary to_json() const {
|
|
|
+ Dictionary dict;
|
|
|
+
|
|
|
+ dict["glob"] = glob;
|
|
|
+ dict["matches"] = matches;
|
|
|
+
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * A filter to describe in which file operation requests or notifications
|
|
|
+ * the server is interested in.
|
|
|
+ */
|
|
|
+struct FileOperationFilter {
|
|
|
+ /**
|
|
|
+ * The actual file operation pattern.
|
|
|
+ */
|
|
|
+ FileOperationPattern pattern;
|
|
|
+
|
|
|
+ Dictionary to_json() const {
|
|
|
+ Dictionary dict;
|
|
|
+
|
|
|
+ dict["pattern"] = pattern.to_json();
|
|
|
+
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * The options to register for file operations.
|
|
|
+ */
|
|
|
+struct FileOperationRegistrationOptions {
|
|
|
+ /**
|
|
|
+ * The actual filters.
|
|
|
+ */
|
|
|
+ Vector<FileOperationFilter> filters;
|
|
|
+
|
|
|
+ FileOperationRegistrationOptions() {
|
|
|
+ filters.push_back(FileOperationFilter());
|
|
|
+ }
|
|
|
+
|
|
|
+ Dictionary to_json() const {
|
|
|
+ Dictionary dict;
|
|
|
+
|
|
|
+ Array filts;
|
|
|
+ for (int i = 0; i < filters.size(); i++) {
|
|
|
+ filts.push_back(filters[i].to_json());
|
|
|
+ }
|
|
|
+ dict["filters"] = filts;
|
|
|
+
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * The server is interested in file notifications/requests.
|
|
|
+ */
|
|
|
+struct FileOperations {
|
|
|
+ /**
|
|
|
+ * The server is interested in receiving didDeleteFiles file notifications.
|
|
|
+ */
|
|
|
+ FileOperationRegistrationOptions didDelete;
|
|
|
+
|
|
|
+ Dictionary to_json() const {
|
|
|
+ Dictionary dict;
|
|
|
+
|
|
|
+ dict["didDelete"] = didDelete.to_json();
|
|
|
+
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * Workspace specific server capabilities
|
|
|
+ */
|
|
|
+struct Workspace {
|
|
|
+ /**
|
|
|
+ * The server is interested in file notifications/requests.
|
|
|
+ */
|
|
|
+ FileOperations fileOperations;
|
|
|
+
|
|
|
+ Dictionary to_json() const {
|
|
|
+ Dictionary dict;
|
|
|
+
|
|
|
+ dict["fileOperations"] = fileOperations.to_json();
|
|
|
+
|
|
|
+ return dict;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
struct ServerCapabilities {
|
|
|
/**
|
|
|
* Defines how text documents are synced. Is either a detailed structure defining each notification or
|
|
@@ -1575,6 +1683,11 @@ struct ServerCapabilities {
|
|
|
*/
|
|
|
bool workspaceSymbolProvider = true;
|
|
|
|
|
|
+ /**
|
|
|
+ * The server supports workspace folder.
|
|
|
+ */
|
|
|
+ Workspace workspace;
|
|
|
+
|
|
|
/**
|
|
|
* The server provides code actions. The `CodeActionOptions` return type is only
|
|
|
* valid if the client signals code action literal support via the property
|
|
@@ -1662,6 +1775,7 @@ struct ServerCapabilities {
|
|
|
dict["documentHighlightProvider"] = documentHighlightProvider;
|
|
|
dict["documentSymbolProvider"] = documentSymbolProvider;
|
|
|
dict["workspaceSymbolProvider"] = workspaceSymbolProvider;
|
|
|
+ dict["workspace"] = workspace.to_json();
|
|
|
dict["codeActionProvider"] = codeActionProvider;
|
|
|
dict["documentFormattingProvider"] = documentFormattingProvider;
|
|
|
dict["documentRangeFormattingProvider"] = documentRangeFormattingProvider;
|