浏览代码

Make LSP ignore $/ messages

Fixes #38814
Francois Belair 5 年之前
父节点
当前提交
9c273307d8
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      modules/jsonrpc/jsonrpc.cpp

+ 4 - 0
modules/jsonrpc/jsonrpc.cpp

@@ -98,6 +98,10 @@ Variant JSONRPC::process_action(const Variant &p_action, bool p_process_arr_elem
 	if (p_action.get_type() == Variant::DICTIONARY) {
 	if (p_action.get_type() == Variant::DICTIONARY) {
 		Dictionary dict = p_action;
 		Dictionary dict = p_action;
 		String method = dict.get("method", "");
 		String method = dict.get("method", "");
+		if (method.begins_with("$/")) {
+			return ret;
+		}
+
 		Array args;
 		Array args;
 		if (dict.has("params")) {
 		if (dict.has("params")) {
 			Variant params = dict.get("params", Variant());
 			Variant params = dict.get("params", Variant());