feat: config option to disable lsp file methods (#477)
* added config option to enable or disable lsp_file_methods * refactor: rename enable -> enabled --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
parent
665bf2edc9
commit
f60bb7f793
4 changed files with 16 additions and 2 deletions
|
|
@ -389,7 +389,11 @@ M.process_actions = function(actions, cb)
|
|||
"User",
|
||||
{ pattern = "OilActionsPre", modeline = false, data = { actions = actions } }
|
||||
)
|
||||
local did_complete = lsp_helpers.will_perform_file_operations(actions)
|
||||
|
||||
local did_complete = nil
|
||||
if config.lsp_file_methods.enabled then
|
||||
did_complete = lsp_helpers.will_perform_file_operations(actions)
|
||||
end
|
||||
|
||||
-- Convert some cross-adapter moves to a copy + delete
|
||||
for _, action in ipairs(actions) do
|
||||
|
|
@ -442,7 +446,9 @@ M.process_actions = function(actions, cb)
|
|||
return
|
||||
end
|
||||
if idx > #actions then
|
||||
did_complete()
|
||||
if did_complete then
|
||||
did_complete()
|
||||
end
|
||||
finish()
|
||||
return
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue