()
| 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"; |
no test coverage detected