We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f303d38 commit 525357cCopy full SHA for 525357c
src/utils/monaco/highlightErrors.ts
@@ -1,17 +1,17 @@
1
import {parseYqlQueryWithoutCursor} from '@gravity-ui/websql-autocomplete/yql';
2
+import {debounce} from 'lodash';
3
import {MarkerSeverity, editor} from 'monaco-editor';
4
5
import i18n from './i18n';
6
7
const owner = 'ydb';
8
-let errorsHighlightingTimeoutId: ReturnType<typeof setTimeout>;
9
+const debouncedHighlightErrors = debounce(highlightErrors, 500);
10
11
export function updateErrorsHighlighting() {
12
unHighlightErrors();
13
- clearTimeout(errorsHighlightingTimeoutId);
14
- errorsHighlightingTimeoutId = setTimeout(() => highlightErrors(), 500);
+ debouncedHighlightErrors();
15
}
16
17
function highlightErrors() {
0 commit comments