Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GDScriptLanguageProtocol
实验性: This class may be changed or removed in future versions.
GDScript 语言服务器。
描述
提供对语言服务器中已实现的特定功能的访问。
注意: 此类并非可用于访问 LSP(语言服务器协议)功能的语言服务器客户端。它仅提供对一组有限功能的访问,这些功能是使用与语言服务器相同的技术基础实现的。
方法
initialize(params: Dictionary) |
|
void |
initialized(params: Variant) |
is_initialized() const |
|
is_smart_resolve_enabled() const |
|
void |
notify_client(method: String, params: Variant = null, client_id: int = -1) |
void |
on_client_disconnected(client_id: int) |
方法说明
GDScriptTextDocument get_text_document() 🔗
已弃用: GDScriptTextDocument is deprecated.
返回语言服务器的 GDScriptTextDocument 实例。
GDScriptWorkspace get_workspace() 🔗
返回语言服务器的 GDScriptWorkspace 实例。
Variant initialize(params: Dictionary) 🔗
已弃用: Accessing LSP endpoints directly might lead to unwanted side effects. Connect to the server via TCP, like a regular language server client.
void initialized(params: Variant) 🔗
已弃用: Accessing LSP endpoints directly might lead to unwanted side effects. Connect to the server via TCP, like a regular language server client.
如果语言服务器已经被语言服务器客户端初始化,则返回 true,否则返回 false。
bool is_smart_resolve_enabled() const 🔗
如果语言服务器正在提供智能解析(smart resolve)功能,则返回 true,否则返回 false。该功能可以通过编辑器设置来进行配置。
void notify_client(method: String, params: Variant = null, client_id: int = -1) 🔗
已弃用: Might result in unwanted side effects for connected clients.
已弃用: Might result in unwanted side effects for connected clients.
void on_client_disconnected(client_id: int) 🔗
已弃用: Might result in unwanted side effects for connected clients.