Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting to increase timeout #1719

Closed
kenodegard opened this issue Jun 3, 2021 · 2 comments · Fixed by #1728
Closed

Setting to increase timeout #1719

kenodegard opened this issue Jun 3, 2021 · 2 comments · Fixed by #1728

Comments

@kenodegard
Copy link

Is your feature request related to a problem? Please describe.
I have "lsp_format_on_save" enabled for LSP-pylsp where I use black. This works great in most cases but from time to time I'm working on larger/more complex codes that take a little longer to format and so the formatting hits the 1000ms default timeout here:

def _on_timeout(self) -> None:
if not self._completed and not self._cancelled:
self._set_view_status('LSP: Timeout processing {}'.format(self.__class__.__name__))
self._cancelled = True
self._on_done()

And as seen here in the status bar:
Screen Shot 2021-06-03 at 6 25 47 PM

Describe the solution you'd like
Add a setting allowing us to customize the timeout value.

Describe alternatives you've considered
A working alternative is to force the formatting via context menu > LSP > Format File but for obvious reasons this can become annoying.

Additional context
N/A

@kenodegard
Copy link
Author

I see that there is a "code_action_on_save_timeout_ms" setting but this does not appear to apply to formatting on save? I would assume a similar implementation is needed?

@rchl
Copy link
Member

rchl commented Jun 4, 2021

True, the other save tasks have hard-coded 1s limit.

Maybe best would be to rename the setting to on_save_task_timeout_ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants