MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / initialize

Function initialize

src/common/lsp/protocol/protocol.cpp:222–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222QJsonObject initialize(const QString &workspaceFolder, const QString &language, const QString &compile)
223{
224 QJsonObject params;
225 if (language == C_CPP) {
226 QJsonObject capabilitiesSemanticTokens { { { "dynamicRegistration", true },
227 { "formats", QJsonArray { "relative" } },
228 { "multilineTokenSupport", false },
229 { "overlappingTokenSupport", false },
230 { "requests", QJsonArray { "full", QJsonObject { { "delta", true } }, QJsonObject { { "range", true } } } },
231 { "tokenModifiers", tokenModifiers() },
232 { "tokenTypes", tokenTypes() } } };
233
234 QJsonObject capabilities {
235 { K_TEXTDOCUMENT, QJsonObject { { "documentLink", QJsonObject { { "dynamicRegistration", true } } }, { "documentHighlight", QJsonObject { { "dynamicRegistration", true } } }, {
236 K_DOCUMENTSYMBOL,
237 QJsonObject { { K_HIERARCHICALDOCUMENTSYMBOLSUPPORT, true } },
238 },
239 { K_PUBLISHDIAGNOSTICS, QJsonObject { { K_CATEGORYSUPPORT, true }, { K_CODEACTIONSINLINE, true } } },
240 { "inactiveRegionsCapabilities", QJsonObject { { "inactiveRegions", true } } },
241 { "definition", QJsonObject { { { "dynamicRegistration", true }, { "linkSupport", true } } } },
242 { "colorProvider", QJsonObject { { "dynamicRegistration", true } } },
243 { "declaration", QJsonObject { { "dynamicRegistration", true }, { "linkSupport", true } } },
244 { "semanticHighlightingCapabilities", QJsonObject { { "semanticHighlighting", true } } },
245 { "semanticTokens", capabilitiesSemanticTokens },
246 { "hover", QJsonObject { { "contentFormat", QJsonArray { "markdown", "plaintext" } } } },
247 { "completion", QJsonObject { { "editsNearCursor", true } } } } },
248 { "workspace", workspace() },
249 {
250 "foldingRangeProvider",
251 true,
252 }
253 };
254
255 QJsonObject highlight {
256 { "largeFileSize", 2097152 },
257 { "lsRanges", false },
258 { "blacklist", QJsonArray() },
259 { "whitelist", QJsonArray() }
260 };
261
262 QJsonObject client {
263 { "diagnosticsRelatedInformation", true },
264 { "hierarchicalDocumentSymbolSupport", true },
265 { "linkSupport", true },
266 { "snippetSupport", true },
267 };
268
269 QJsonObject workspace {
270 { "name", QFileInfo(workspaceFolder).fileName() },
271 { K_URI, QUrl::fromLocalFile(workspaceFolder).toString() }
272 };
273
274 QJsonArray workspaceFolders { workspace };
275
276 QJsonObject initializationOptions {
277 { "compilationDatabasePath", compile }
278 };
279

Callers 15

DebugEngineClass · 0.50
slotReceiveClientInfoMethod · 0.50
slotReceivePojectInfoMethod · 0.50
initializeMethod · 0.50
initRequestMethod · 0.50
idsMethod · 0.50
idMethod · 0.50
CommandParserMethod · 0.50
RawDebugSessionMethod · 0.50
DebugSessionMethod · 0.50
initializeMethod · 0.50
NotificationModuleClass · 0.50

Calls 9

tokenModifiersFunction · 0.85
tokenTypesFunction · 0.85
workspaceFunction · 0.85
fileNameMethod · 0.80
getFunction · 0.50
toJsonValueStrFunction · 0.50
toStringMethod · 0.45
errorStringMethod · 0.45
objectMethod · 0.45

Tested by

no test coverage detected