1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Make LSP send applyEdit to connect editor signals

This commit is contained in:
Francois Belair
2021-07-08 15:21:14 -04:00
parent f8b8ef656c
commit 885d905b0d
5 changed files with 95 additions and 0 deletions

View File

@@ -263,6 +263,16 @@ struct WorkspaceEdit {
*/
Map<String, Vector<TextEdit>> changes;
_FORCE_INLINE_ void add_edit(const String &uri, const TextEdit &edit) {
if (changes.has(uri)) {
changes[uri].push_back(edit);
} else {
Vector<TextEdit> edits;
edits.push_back(edit);
changes[uri] = edits;
}
}
_FORCE_INLINE_ Dictionary to_json() const {
Dictionary dict;
@@ -1322,6 +1332,18 @@ struct DocumentSymbol {
}
};
struct ApplyWorkspaceEditParams {
WorkspaceEdit edit;
Dictionary to_json() {
Dictionary dict;
dict["edit"] = edit.to_json();
return dict;
}
};
struct NativeSymbolInspectParams {
String native_class;
String symbol_name;