Add option to configure tokenizeMaxLineLength and tokenizeTimeLimit in @shikijs/monaco
floriansbh opened this issue · comments
Clear and concise description of the problem
Currently both of these settings are are statically set in the tokenize() function (tokenizeMaxLineLength to 20.000 and tokenizeTimeLimit to 500) and cannot be changed in any way. My problem is that I'm mostly dealing with bigger files which are most of the time minified and exceed the tokenizeMaxLineLength and tokenizeTimeLimit so I can't really get any syntax highlighting most of the time.
Suggested solution
Adding an argument for these settings to the shikiToMonaco() function exported by @shikijs/monaco or just making use of the options passed to the monaco.editor.create() function would probably be the most optimal solution
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributes
- If this feature request is accepted, I am willing to submit a PR to fix this issue
Sure, pr welcome!