diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-10-03 13:40:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 13:40:09 +0200 |
commit | d66cce0215fe2f963ecf35c2176f4c89ef793ac5 (patch) | |
tree | 6427ebcd16a48cba2914d760e8a77fd46aff866c /modules/gdscript/language_server/lsp.hpp | |
parent | 9a115ccaf3dd0224de0e5b1a2d116e53b6fabffb (diff) | |
parent | 6a8303f82f78646d77bc3f18b7083313005485c9 (diff) | |
download | redot-engine-d66cce0215fe2f963ecf35c2176f4c89ef793ac5.tar.gz |
Merge pull request #32517 from GodotExplorer/gdscript-lsp
GDScript LSP server improvement
Diffstat (limited to 'modules/gdscript/language_server/lsp.hpp')
-rw-r--r-- | modules/gdscript/language_server/lsp.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index 3e57b6ee7e..e60e28cc15 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -199,6 +199,41 @@ struct TextDocumentPositionParams { } }; +struct DocumentLinkParams { + /** + * The document to provide document links for. + */ + TextDocumentIdentifier textDocument; + + _FORCE_INLINE_ void load(const Dictionary &p_params) { + textDocument.load(p_params["textDocument"]); + } +}; + +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +struct DocumentLink { + + /** + * The range this link applies to. + */ + Range range; + + /** + * The uri this link points to. If missing a resolve request is sent later. + */ + DocumentUri target; + + Dictionary to_json() const { + Dictionary dict; + dict["range"] = range.to_json(); + dict["target"] = target; + return dict; + } +}; + /** * A textual edit applicable to a text document. */ |