mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 10:23:28 +00:00
Implement DocumentLink of GDScript LSP Server
This commit is contained in:
parent
d1a6964d39
commit
6a8303f82f
7 changed files with 99 additions and 4 deletions
|
|
@ -271,8 +271,17 @@ Array GDScriptTextDocument::codeLens(const Dictionary &p_params) {
|
|||
return arr;
|
||||
}
|
||||
|
||||
Variant GDScriptTextDocument::documentLink(const Dictionary &p_params) {
|
||||
Variant ret;
|
||||
Array GDScriptTextDocument::documentLink(const Dictionary &p_params) {
|
||||
Array ret;
|
||||
|
||||
lsp::DocumentLinkParams params;
|
||||
params.load(p_params);
|
||||
|
||||
List<lsp::DocumentLink> links;
|
||||
GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_document_links(params.textDocument.uri, links);
|
||||
for (const List<lsp::DocumentLink>::Element *E = links.front(); E; E = E->next()) {
|
||||
ret.push_back(E->get().to_json());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue