feat: Add core.largeFileThreshold config for TextMate large file mode#1413
feat: Add core.largeFileThreshold config for TextMate large file mode#1413asiloisad wants to merge 2 commits intopulsar-edit:masterfrom
Conversation
|
Thanks a ton for your contribution! I think this is a great idea, I'm just re-running the tests so we can make sure everything is happy, but also thanks for making sure to include new tests here! |
|
My only feedback here is that we might want to make this
I regret, for instance, that the Atom folks added the If we do this, we could also go one step further and make sure that the setting is checked on a per-language basis by passing a scope selector into |
|
I agree with the proposed changes.
👍 |
Add a new
core.largeFileThresholdconfig setting to make the TextMate grammar large file mode threshold configurable.Previously, the threshold was hardcoded at 2MB. Files larger than this would open with syntax highlighting disabled (large file mode). This PR allows users to customize this threshold in Settings.
Changes
core.largeFileThresholdconfig option inconfig-schema.js(default: 2MB)text-mate-language-mode.jsto read threshold from configUsage
In Settings → Core → Large File Threshold:
2(2MB, preserves existing behavior)20for 20MB)0to never auto-enable large file mode