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

Method UpdateClientConfig

CodeFormatServer/src/Service/ConfigService.cpp:76–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void ConfigService::UpdateClientConfig(ClientConfig clientConfig) {
77
78 LuaDiagnosticStyle diagnosticStyle;
79 diagnosticStyle.ParseTree(clientConfig.configTree);
80 _diagnosticStyle = diagnosticStyle;
81
82 CodeSpellChecker::CustomDictionary dictionary(clientConfig.emmylua_spell_dict.begin(),
83 clientConfig.emmylua_spell_dict.end());
84 auto diagnosticService = _owner->GetService<DiagnosticService>();
85 diagnosticService->GetSpellChecker()->SetCustomDictionary(dictionary);
86}
87
88LuaDiagnosticStyle &ConfigService::GetDiagnosticStyle() {
89 return _diagnosticStyle;

Callers 1

Calls 5

ParseTreeMethod · 0.80
SetCustomDictionaryMethod · 0.80
GetSpellCheckerMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected