Skip to content

[Bug] Setting maxTokenizationLineLength has no effect #3025

@jonatanklosko

Description

@jonatanklosko

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

monaco.editor.create(document.getElementById('container'), {
  value: "[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]",
  language: 'javascript',
  maxTokenizationLineLength: 4,
});

Actual Behavior

The line gets tokenized and highlighted.

Note: when hovering over the line it actually says that tokenization was skipped.

Expected Behavior

Tokenization should be skipped.

Additional Context

The default maxTokenizationLineLength value is 20_000. When I paste a longer line into https://vscode.dev it isn't highlighted, however it gets highlighted in the Monaco playground.

Since Monaco handles highlighting separately, my guess would be that this option is not taken into account.

The on-hover messages is added here (for both Monaco and VSCode) and the TextMate tokenization is skipped here.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugtokenization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions