6

Is it possible to use "editor.maxTokenizationLineLength" in a vscode language extension or similar implementations.

The situation is that I have my own language type. I want to have a limitation of the line length, because whenever a linebreak occurs in the expected value, the colored highlight will be lost, removing so the warning for the user.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
Boyka Zhu
  • 391
  • 1
  • 4
  • 18
  • 1
    It might be possible via `configurationDefaults`, see https://stackoverflow.com/questions/40550536/disable-wordbasedsuggestions-from-an-extension/53971423#53971423 for instance. I'm not sure if `maxTokenizationLineLength` is available as a language-specific setting though. – Gama11 Dec 11 '19 at 13:02
  • @Gama11, thanks for the useful tip, but maxTokenizationLineLength does not work for a language extension. – Boyka Zhu Dec 12 '19 at 05:24
  • @Gama11 I finally use "editor.rulers": [value], at least this could give an editor area warning. – Boyka Zhu Dec 12 '19 at 05:28
  • I tried to fix the question text to conform to SO's standards, but I'm not 100% sure I found the correct wording. Don't hesitate to fix further if I didn't catch the original problem correctly. – Mike Lischke Dec 12 '19 at 08:21

1 Answers1

13

In Visual Studio Code go to File--> Preferences--> Setting and search for Max, you will find Max Tokenization Length. Changes values there.

R15
  • 13,982
  • 14
  • 97
  • 173