Add a symbol pool to cache all native symbols and workspackes symbols.

Implement hover
Implement completion documentation resolve
Implement hover documentation
Implement go to definition
This commit is contained in:
geequlim 2019-06-23 01:48:31 +08:00
parent f58560ac36
commit 37aafaaa9c
8 changed files with 864 additions and 36 deletions

View file

@ -90,7 +90,7 @@ void GDScriptLanguageProtocol::_bind_methods() {
Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) {
lsp::InitializeResult ret;
workspace.initialize();
return ret.to_json();
}
@ -163,6 +163,7 @@ GDScriptLanguageProtocol::GDScriptLanguageProtocol() {
server = NULL;
singleton = this;
set_scope("textDocument", &text_document);
set_scope("completionItem", &text_document);
set_scope("workspace", &workspace);
workspace.root = ProjectSettings::get_singleton()->get_resource_path();
}