feat: add ability to alter lsp file operation timeout (#317)
* feat: add ability to alter lsp file operation timeout * change default * fix table * add missing * move inside table * remove duplicate * reuse default * change message * refactor: rename autosave config option --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
parent
132b4ea074
commit
29a06fcc90
4 changed files with 35 additions and 13 deletions
|
|
@ -68,9 +68,10 @@ M.will_perform_file_operations = function(actions)
|
|||
end
|
||||
end
|
||||
end
|
||||
accum(workspace.will_create_files(creates))
|
||||
accum(workspace.will_delete_files(deletes))
|
||||
accum(workspace.will_rename_files(moves))
|
||||
local timeout_ms = config.lsp_file_methods.timeout_ms
|
||||
accum(workspace.will_create_files(creates, { timeout_ms = timeout_ms }))
|
||||
accum(workspace.will_delete_files(deletes, { timeout_ms = timeout_ms }))
|
||||
accum(workspace.will_rename_files(moves, { timeout_ms = timeout_ms }))
|
||||
if final_err then
|
||||
vim.notify(
|
||||
string.format("[lsp] file operation error: %s", vim.inspect(final_err)),
|
||||
|
|
@ -83,7 +84,7 @@ M.will_perform_file_operations = function(actions)
|
|||
workspace.did_delete_files(deletes)
|
||||
workspace.did_rename_files(moves)
|
||||
|
||||
local autosave = config.lsp_rename_autosave
|
||||
local autosave = config.lsp_file_methods.autosave_changes
|
||||
if autosave == false then
|
||||
return
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue