Skip to content

make the timeout for formatOnSave configurable - #43702

Merged
Johannes Rieken (jrieken) merged 2 commits into
microsoft:masterfrom
buyology:formatOnSave-timeout
Mar 2, 2018
Merged

Johannes Rieken (jrieken) merged 2 commits into
microsoft:masterfrom
buyology:formatOnSave-timeout

Conversation

@buyology

@buyology robin (buyology) commented Feb 14, 2018 •

Copy link
Copy Markdown

Fixes #41194

As reported by users of extensions for TypeScript, Python, ruby and go formatOnSave-commands can take longer than the hard coded 750 ms, e.g. for large projects or complex commands.

This removes the hardcoded value and instead makes it user configurable.

'overridable': true,
'scope': ConfigurationScope.RESOURCE
},
'editor.formatOnSaveTimeout': {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting is editor-global, it will be hard for end user to figure out correct timeout as it depends on the language and the machine speed.

@buyology robin (buyology) Feb 15, 2018 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Made it overridable, then at least every extension that identifies this as a potential issue can provide a sane default (and the user the opportunity to configure it for that specific usage).

@buyology

Copy link
Copy Markdown
Author

Any update on this Johannes Rieken (@jrieken)?

@prateek

Copy link
Copy Markdown

+1 I was about to put up a PR for the same thing.

@jrieken Johannes Rieken (jrieken) added this to the March 2018 milestone Feb 26, 2018
@jrieken Johannes Rieken (jrieken) added the formatting Source formatter issues label Feb 26, 2018
@jrieken

Copy link
Copy Markdown
Contributor

Back from vacations... Too late for Feb-endgame but will take a look in March.

@jrieken Johannes Rieken (jrieken) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I will merge as soon as master is open for business again.

@jrieken Johannes Rieken (jrieken) added the feature-request Request for new features or functionality label Mar 2, 2018
@jrieken
Johannes Rieken (jrieken) merged commit 41f7a57 into microsoft:master Mar 2, 2018
@jrieken Johannes Rieken (jrieken) added verification-needed Verification of issue is requested release-notes Release notes issues labels Mar 26, 2018
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature-request Request for new features or functionality formatting Source formatter issues release-notes Release notes issues verification-needed Verification of issue is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format Document working, editor.formatOnSave=true broken

4 participants