MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getAutocompleteConfig

Function getAutocompleteConfig

src/lib/editorManager.js:325–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323 }
324
325 function getAutocompleteConfig() {
326 const live = !!appSettings?.value?.liveAutoCompletion;
327 const config = {
328 activateOnTyping: live,
329 activateOnTypingDelay: isCoarsePointerDevice() ? 220 : 100,
330 };
331
332 if (appSettings?.value?.languageCompletion === false) {
333 // CodeMirror override mode bypasses normal completion discovery,
334 // including plugin-provided sources. Re-add the sources that should
335 // survive this setting explicitly.
336 config.override = [getLspCompletionSource];
337
338 if (appSettings?.value?.localWordCompletion) {
339 config.override.push(localWordCompletionSource);
340 }
341
342 if (appSettings?.value?.useEmmet !== false) {
343 config.override.push(getEmmetCompletionSource);
344 }
345 }
346
347 return config;
348 }
349
350 function makeFontTheme() {
351 const fontSize = appSettings?.value?.fontSize || "12px";

Callers 1

buildFunction · 0.85

Calls 1

isCoarsePointerDeviceFunction · 0.70

Tested by

no test coverage detected