-
Notifications
You must be signed in to change notification settings - Fork 138
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
feat: add ability to alter lsp file operation timeout #317
Conversation
There was a problem hiding this 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
lua/oil/config.lua
Outdated
|
||
-- The amount of time LSP waits for file operation before it errors | ||
lsp_file_operation_timeout_ms = 1000, | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Thanks for the PR! |
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