MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / OnEditorConfigUpdate

Method OnEditorConfigUpdate

CodeFormatServer/src/LSP/LSPHandle.cpp:180–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180std::shared_ptr<lsp::Serializable> LSPHandle::OnEditorConfigUpdate(
181 std::shared_ptr<lsp::ConfigUpdateParams> params) {
182 switch (params->type) {
183 case lsp::FileChangeType::Created:
184 case lsp::FileChangeType::Changed: {
185 _server->GetService<ConfigService>()->LoadEditorconfig(params->source.workspace, params->source.path);
186 break;
187 }
188 case lsp::FileChangeType::Delete: {
189 _server->GetService<ConfigService>()->RemoveEditorconfig(params->source.workspace);
190 break;
191 }
192 }
193
194 RefreshDiagnostic();
195
196 return nullptr;
197}
198
199std::shared_ptr<lsp::Serializable> LSPHandle::OnRangeFormatting(
200 std::shared_ptr<lsp::DocumentRangeFormattingParams> params) {

Callers

nothing calls this directly

Calls 2

LoadEditorconfigMethod · 0.80
RemoveEditorconfigMethod · 0.80

Tested by

no test coverage detected