@@ -124,7 +124,7 @@ void CommandService::Import(std::shared_ptr<vscode::ExecuteCommandParams> param)
124124
125125 std::string requireString = Util::format (" local {} = {}(\" {}\" )\n " , moduleDefineName, config->import_function ,
126126 moduleName);
127- auto parser = LanguageClient::GetInstance (). GetFileParser (uri);
127+ auto parser = _owner-> GetFileParser (uri);
128128 auto applyParams = std::make_shared<vscode::ApplyWorkspaceEditParams>();
129129 auto it = applyParams->edit .changes .emplace (uri, std::vector<vscode::TextEdit>());
130130 auto & change = it.first ->second ;
@@ -133,9 +133,9 @@ void CommandService::Import(std::shared_ptr<vscode::ExecuteCommandParams> param)
133133
134134 edit.newText = requireString;
135135
136- edit.range = LanguageClient::GetInstance (). GetService <ModuleService>()->FindRequireRange (parser, config);
136+ edit.range = GetService<ModuleService>()->FindRequireRange (parser, config);
137137
138- LanguageClient::GetInstance (). SendRequest (" workspace/applyEdit" , applyParams);
138+ _owner-> SendRequest (" workspace/applyEdit" , applyParams);
139139}
140140
141141void CommandService::SpellCorrect (std::shared_ptr<vscode::ExecuteCommandParams> param)
@@ -157,7 +157,7 @@ void CommandService::SpellCorrect(std::shared_ptr<vscode::ExecuteCommandParams>
157157
158158 edit.range = range;
159159
160- LanguageClient::GetInstance (). SendRequest (" workspace/applyEdit" , applyParams);
160+ _owner-> SendRequest (" workspace/applyEdit" , applyParams);
161161}
162162
163163// void CommandService::SpellAddDict(std::shared_ptr<vscode::ExecuteCommandParams> param)
0 commit comments