瀏覽代碼

[display] use "path" on module types

Simon Krajewski 7 年之前
父節點
當前提交
0b753cf6f9
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/core/display/completionItem.ml

+ 6 - 5
src/core/display/completionItem.ml

@@ -176,12 +176,13 @@ module CompletionModuleType = struct
 
 
 	let to_json ctx cm is =
 	let to_json ctx cm is =
 		let fields =
 		let fields =
-			("pack",jlist jstring cm.pack) ::
-			("name",jstring cm.name) ::
-			("moduleName",jstring cm.module_name) ::
-			("isPrivate",jbool cm.is_private) ::
+			("path",jobject [
+				("pack",jlist jstring cm.pack);
+				("moduleName",jstring cm.module_name);
+				("typeName",jstring cm.name);
+				("importStatus",jint (ImportStatus.to_int is));
+			]) ::
 			("kind",jint (to_int cm.kind)) ::
 			("kind",jint (to_int cm.kind)) ::
-			("importStatus",jint (ImportStatus.to_int is)) ::
 			(match ctx.generation_mode with
 			(match ctx.generation_mode with
 			| GMFull | GMWithoutDoc ->
 			| GMFull | GMWithoutDoc ->
 				("pos",generate_pos ctx cm.pos) ::
 				("pos",generate_pos ctx cm.pos) ::