MCPcopy Create free account
hub / github.com/KDE/kate / writeConfig

Method writeConfig

addons/lspclient/lspclientplugin.cpp:162–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void LSPClientPlugin::writeConfig() const
163{
164 KConfigGroup config(KSharedConfig::openConfig(), lspClientConfigGroup());
165 config.writeEntry(CONFIG_SYMBOL_DETAILS, m_symbolDetails);
166 config.writeEntry(CONFIG_SYMBOL_TREE, m_symbolTree);
167 config.writeEntry(CONFIG_SYMBOL_EXPAND, m_symbolExpand);
168 config.writeEntry(CONFIG_SYMBOL_SORT, m_symbolSort);
169 config.writeEntry(CONFIG_COMPLETION_DOC, m_complDoc);
170 config.writeEntry(CONFIG_REFERENCES_DECLARATION, m_refDeclaration);
171 config.writeEntry(CONFIG_COMPLETION_PARENS, m_complParens);
172 config.writeEntry(CONFIG_AUTO_HOVER, m_autoHover);
173 config.writeEntry(CONFIG_TYPE_FORMATTING, m_onTypeFormatting);
174 config.writeEntry(CONFIG_INCREMENTAL_SYNC, m_incrementalSync);
175 config.writeEntry(CONFIG_HIGHLIGHT_GOTO, m_highlightGoto);
176 config.writeEntry(CONFIG_DIAGNOSTICS, m_diagnostics);
177 config.writeEntry(CONFIG_MESSAGES, m_messages);
178 config.writeEntry(CONFIG_SERVER_CONFIG, m_configPath);
179 config.writeEntry(CONFIG_SEMANTIC_HIGHLIGHTING, m_semanticHighlighting);
180 config.writeEntry(CONFIG_SIGNATURE_HELP, m_signatureHelp);
181 config.writeEntry(CONFIG_AUTO_IMPORT, m_autoImport);
182 config.writeEntry(CONFIG_FORMAT_ON_SAVE, m_fmtOnSave);
183 config.writeEntry(CONFIG_INLAY_HINT, m_inlayHints);
184 config.writeEntry(CONFIG_SHOW_COMPL, m_showCompl);
185 config.writeEntry(CONFIG_HIGHLIGHT_SYMBOL, m_highLightSymbol);
186
187 // write allow + block lists as two separate keys
188 QStringList allowed, blocked;
189 for (const auto &it : m_serverCommandLineToAllowedState) {
190 if (it.second) {
191 allowed.push_back(it.first);
192 } else {
193 blocked.push_back(it.first);
194 }
195 }
196 config.writeEntry(CONFIG_ALLOWED_COMMANDS, allowed);
197 config.writeEntry(CONFIG_BLOCKED_COMMANDS, blocked);
198
199 Q_EMIT update();
200}
201
202bool LSPClientPlugin::isCommandLineAllowed(const QStringList &cmdline)
203{

Callers 1

applyMethod · 0.45

Calls 1

lspClientConfigGroupFunction · 0.85

Tested by

no test coverage detected