aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/xtext/OccurrencesService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/xtext/OccurrencesService.ts')
-rw-r--r--subprojects/frontend/src/xtext/OccurrencesService.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/subprojects/frontend/src/xtext/OccurrencesService.ts b/subprojects/frontend/src/xtext/OccurrencesService.ts
index 9d738d76..248a9a87 100644
--- a/subprojects/frontend/src/xtext/OccurrencesService.ts
+++ b/subprojects/frontend/src/xtext/OccurrencesService.ts
@@ -1,5 +1,6 @@
1import { Transaction } from '@codemirror/state'; 1import { Transaction } from '@codemirror/state';
2import { debounce } from 'lodash-es'; 2import { debounce } from 'lodash-es';
3import ms from 'ms';
3 4
4import type EditorStore from '../editor/EditorStore'; 5import type EditorStore from '../editor/EditorStore';
5import { 6import {
@@ -11,7 +12,7 @@ import getLogger from '../utils/getLogger';
11import type UpdateService from './UpdateService'; 12import type UpdateService from './UpdateService';
12import type { TextRegion } from './xtextServiceResults'; 13import type { TextRegion } from './xtextServiceResults';
13 14
14const FIND_OCCURRENCES_TIMEOUT_MS = 1000; 15const FIND_OCCURRENCES_TIMEOUT = ms('1s');
15 16
16const log = getLogger('xtext.OccurrencesService'); 17const log = getLogger('xtext.OccurrencesService');
17 18
@@ -33,7 +34,7 @@ export default class OccurrencesService {
33 34
34 private readonly findOccurrencesLater = debounce( 35 private readonly findOccurrencesLater = debounce(
35 () => this.findOccurrences(), 36 () => this.findOccurrences(),
36 FIND_OCCURRENCES_TIMEOUT_MS, 37 FIND_OCCURRENCES_TIMEOUT,
37 ); 38 );
38 39
39 constructor( 40 constructor(