@codingame/monaco-vscode-textmate-service-override 3.2.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.js +4 -2
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateWorkerTokenizer.js +5 -1
- package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +4 -1
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-textmate-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0",
|
|
22
22
|
"vscode-oniguruma": "1.7.0",
|
|
23
23
|
"vscode-textmate": "9.0.0",
|
|
24
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
24
|
+
"@codingame/monaco-vscode-files-service-override": "4.0.0"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
3
|
+
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
4
|
+
import { keepObserved, observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
5
|
+
import 'vscode/vscode/vs/base/common/cancellation';
|
|
2
6
|
import { countEOL } from 'vscode/vscode/vs/editor/common/core/eolCounter';
|
|
3
7
|
import { LineRange } from 'vscode/vscode/vs/editor/common/core/lineRange';
|
|
4
8
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
@@ -6,8 +10,6 @@ import { TokenizationStateStore } from 'vscode/vscode/vs/editor/common/model/tex
|
|
|
6
10
|
import { ContiguousMultilineTokensBuilder } from 'vscode/vscode/vs/editor/common/tokens/contiguousMultilineTokensBuilder';
|
|
7
11
|
import { MonotonousIndexTransformer, ArrayEdit, SingleArrayEdit } from '../arrayOperation.js';
|
|
8
12
|
import { applyStateStackDiff, INITIAL } from 'vscode-textmate';
|
|
9
|
-
import { keepObserved, observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
10
|
-
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
11
13
|
|
|
12
14
|
class TextMateWorkerTokenizerController extends Disposable {
|
|
13
15
|
static { this._id = 0; }
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
+
import { observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
3
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
4
|
+
import 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
5
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
6
|
+
import 'vscode/vscode/vs/base/common/cancellation';
|
|
2
7
|
import { setTimeout0 } from 'vscode/vscode/vs/base/common/platform';
|
|
3
8
|
import { LineRange } from 'vscode/vscode/vs/editor/common/core/lineRange';
|
|
4
9
|
import { MirrorTextModel } from 'vscode/vscode/vs/editor/common/model/mirrorTextModel';
|
|
@@ -8,7 +13,6 @@ import { LineTokens } from 'vscode/vscode/vs/editor/common/tokens/lineTokens';
|
|
|
8
13
|
import { TextMateTokenizationSupport } from '../../tokenizationSupport/textMateTokenizationSupport.js';
|
|
9
14
|
import { TokenizationSupportWithLineLimit } from '../../tokenizationSupport/tokenizationSupportWithLineLimit.js';
|
|
10
15
|
import { diffStateStacksRefEq } from 'vscode-textmate';
|
|
11
|
-
import { observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
12
16
|
|
|
13
17
|
class TextMateWorkerTokenizer extends MirrorTextModel {
|
|
14
18
|
constructor(uri, lines, eol, versionId, _host, _languageId, _encodedLanguageId, maxTokenizationLineLength) {
|
package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js
CHANGED
|
@@ -5,6 +5,10 @@ import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
|
5
5
|
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
6
6
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { FileAccess, nodeModulesAsarUnpackedPath, nodeModulesPath } from 'vscode/vscode/vs/base/common/network';
|
|
8
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
9
|
+
import 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
10
|
+
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
11
|
+
import 'vscode/vscode/vs/base/common/cancellation';
|
|
8
12
|
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
9
13
|
import { joinPath, isEqualOrParent } from 'vscode/vscode/vs/base/common/resources';
|
|
10
14
|
import { isObject } from 'vscode/vscode/vs/base/common/types';
|
|
@@ -28,7 +32,6 @@ import { grammarsExtPoint } from 'vscode/vscode/vs/workbench/services/textMate/c
|
|
|
28
32
|
import { IWorkbenchThemeService } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
29
33
|
import * as vscodeTextmate from 'vscode-textmate';
|
|
30
34
|
import * as vscodeOniguruma from 'vscode-oniguruma';
|
|
31
|
-
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
32
35
|
|
|
33
36
|
var TextMateTokenizationFeature_1;
|
|
34
37
|
let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disposable {
|
|
@@ -34,7 +34,7 @@ class TextMateTokenizationSupport extends Disposable {
|
|
|
34
34
|
return undefined;
|
|
35
35
|
}
|
|
36
36
|
tokenizeEncoded(line, hasEOL, state) {
|
|
37
|
-
const isRandomSample = Math.random() *
|
|
37
|
+
const isRandomSample = Math.random() * 10_000 < 1;
|
|
38
38
|
const shouldMeasure = this._reportSlowTokenization || isRandomSample;
|
|
39
39
|
const sw = shouldMeasure ? ( new StopWatch(true)) : undefined;
|
|
40
40
|
const textMateResult = this._grammar.tokenizeLine2(line, state, 500);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { nullTokenizeEncoded } from 'vscode/vscode/vs/editor/common/languages/nullTokenize';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
4
|
+
import 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
3
5
|
import { keepObserved } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
6
|
+
import 'vscode/vscode/vs/base/common/cancellation';
|
|
4
7
|
|
|
5
8
|
class TokenizationSupportWithLineLimit extends Disposable {
|
|
6
9
|
get backgroundTokenizerShouldOnlyVerifyTokens() {
|