File tree Expand file tree Collapse file tree 4 files changed +34
-3
lines changed
Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 4343
4444#define PACKAGE_VERSION "0.9.5"
4545
46- /* #undef HAVE_WPRINTF */
46+ #define HAVE_WPRINTF
4747/* #undef HAVE_REALLOCARRAY */
4848
4949
Original file line number Diff line number Diff line change @@ -425,3 +425,8 @@ std::shared_ptr<vscode::Serializable> LanguageService::OnDidChangeWatchedFiles(
425425
426426 return nullptr ;
427427}
428+
429+ std::shared_ptr<vscode::Serializable> LanguageService::OnCompletion (std::shared_ptr<vscode::CompletionParams> param)
430+ {
431+ return nullptr ;
432+ }
Original file line number Diff line number Diff line change @@ -504,3 +504,29 @@ void vscode::CompletionParams::Deserialize(nlohmann::json json)
504504 textDocument.Deserialize (json[" textDocument" ]);
505505 position.Deserialize (json[" position" ]);
506506}
507+
508+ nlohmann::json vscode::CompletionItem::Serialize ()
509+ {
510+ auto object = nlohmann::json::object ();
511+
512+ object[" label" ] = label;
513+ object[" kind" ] = static_cast <int >(kind);
514+ object[" detail" ] = detail;
515+ object[" documentation" ] = documentation;
516+ object[" insertText" ] = insertText;
517+ if (command.has_value ())
518+ {
519+ object[" command" ] = command->Serialize ();
520+ }
521+
522+ return object;
523+ }
524+
525+ nlohmann::json vscode::CompletionList::Serialize ()
526+ {
527+ auto object = nlohmann::json::object ();
528+ object[" isIncomplete" ] = isIncomplete;
529+ object[" items" ] = SerializeArray (items);
530+
531+ return object;
532+ }
Original file line number Diff line number Diff line change @@ -550,9 +550,9 @@ class CompletionList : public Serializable
550550{
551551public:
552552 bool isIncomplete;
553- std::vector<CompletionItem> completions ;
553+ std::vector<CompletionItem> items ;
554554
555- void Deserialize ( nlohmann::json json ) override ;
555+ nlohmann::json Serialize ( ) override ;
556556};
557557
558558}
You can’t perform that action at this time.
0 commit comments