mirror of
https://github.com/godotengine/godot.git
synced 2026-04-21 03:11:05 +00:00
LSP: Fix type bind, mark as experimental, deprecate direct LSP access
This commit is contained in:
parent
bf95b62586
commit
c416cbaf54
12 changed files with 332 additions and 43 deletions
|
|
@ -62,7 +62,7 @@ void GDScriptLanguageServer::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (started && !use_thread) {
|
||||
protocol.poll(poll_limit_usec);
|
||||
GDScriptLanguageProtocol::get_singleton()->poll(poll_limit_usec);
|
||||
}
|
||||
} break;
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ void GDScriptLanguageServer::thread_main(void *p_userdata) {
|
|||
GDScriptLanguageServer *self = static_cast<GDScriptLanguageServer *>(p_userdata);
|
||||
while (self->thread_running) {
|
||||
// Poll 20 times per second
|
||||
self->protocol.poll(self->poll_limit_usec);
|
||||
GDScriptLanguageProtocol::get_singleton()->poll(self->poll_limit_usec);
|
||||
OS::get_singleton()->delay_usec(50000);
|
||||
}
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ void GDScriptLanguageServer::start() {
|
|||
port = (GDScriptLanguageServer::port_override > -1) ? GDScriptLanguageServer::port_override : (int)_EDITOR_GET("network/language_server/remote_port");
|
||||
use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
|
||||
poll_limit_usec = (int)_EDITOR_GET("network/language_server/poll_limit_usec");
|
||||
if (protocol.start(port, IPAddress(host)) == OK) {
|
||||
if (GDScriptLanguageProtocol::get_singleton()->start(port, IPAddress(host)) == OK) {
|
||||
EditorNode::get_log()->add_message("--- GDScript language server started on port " + itos(port) + " ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
if (use_thread) {
|
||||
thread_running = true;
|
||||
|
|
@ -115,7 +115,7 @@ void GDScriptLanguageServer::stop() {
|
|||
thread_running = false;
|
||||
thread.wait_to_finish();
|
||||
}
|
||||
protocol.stop();
|
||||
GDScriptLanguageProtocol::get_singleton()->stop();
|
||||
started = false;
|
||||
EditorNode::get_log()->add_message("--- GDScript language server stopped ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue