You've already forked godot
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user