'description':nls.localize('codeActions',"Enables the code action lightbulb in the editor.")
},
'editor.maxTokenizationLineLength':{
'type':'integer',
'default':20_000,
'description':nls.localize('maxTokenizationLineLength',"Configures length of lines, for which tokenization process will be skipped for performance reasons")
@@ -466,13 +471,13 @@ class TMTokenization implements ITokenizationSupport {
thrownewError('Unexpected: offsetDelta should be 0.');
}
// Do not attempt to tokenize if a line has over 20k
if(line.length>=20000){
// Do not attempt to tokenize if a line is too long
if(line.length>=this._maxTokenizationLineLength){
if(!this._tokenizationWarningAlreadyShown){
this._tokenizationWarningAlreadyShown=true;
this.notificationService.warn(nls.localize('too many characters',"Tokenization is skipped for lines longer than 20k characters for performance reasons."));
this.notificationService.warn(nls.localize('too many characters','Tokenization is skipped for long lines for performance reasons. The length of a long line can be set by configuring editor.maxTokenizationLineLength in settings'));
}
console.log(`Line (${line.substr(0,15)}...): longer than 20k characters, tokenization skipped.`);
console.log(`Line (${line.substr(0,15)}...): longer than ${this._maxTokenizationLineLength} characters, tokenization skipped.`);