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

feat: add ability to alter lsp file operation timeout #317

Merged
merged 9 commits into from
Mar 2, 2024
Merged

feat: add ability to alter lsp file operation timeout #317

merged 9 commits into from
Mar 2, 2024

Conversation

TheNordicMule
Copy link
Contributor

I have a large repo in typescript where 1000ms is not enough time for LSP to resolve my rename file request. Therefore, I want to add a config that allows the user to alter the timeout, while keeping the default of 1000ms

@github-actions github-actions bot requested a review from stevearc February 27, 2024 20:25
Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

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

I'm on board with adding a timeout, just have a few organizational changes requested

Comment on lines 43 to 46

-- The amount of time LSP waits for file operation before it errors
lsp_file_operation_timeout_ms = 1000,

Copy link
Owner

Choose a reason for hiding this comment

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

Since we're adding another option related to LSP file operations (and we may want more in the future), let's nest this under another table

lsp_file_methods = {
  timeout_ms = 1000
}

We'll also want to move lsp_rename_autosave into that table with a backwards compatibility shim and deprecation message, but I can do that after this PR.

Would also recommend rewording the comment to something like "Time to wait for LSP file operations to complete before skipping" to make it clear that we're waiting on the LSP, and that the consequences of a timeout are only that it gets skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @stevearc, I tried to do all of the above. Let me know if there is anything else I need to change. Thank you!

@github-actions github-actions bot requested a review from stevearc March 2, 2024 01:13
@stevearc stevearc merged commit 29a06fc into stevearc:master Mar 2, 2024
8 checks passed
@stevearc
Copy link
Owner

stevearc commented Mar 2, 2024

Thanks for the PR!

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 this pull request may close these issues.

2 participants