diff --git a/lua/oil/cache.lua b/lua/oil/cache.lua index ef782466..ef5597c3 100644 --- a/lua/oil/cache.lua +++ b/lua/oil/cache.lua @@ -197,6 +197,7 @@ M.perform_action = function(action) elseif action.type == "change" then -- Cache doesn't need to update else + ---@diagnostic disable-next-line: undefined-field error(string.format("Bad action type: '%s'", action.type)) end end diff --git a/lua/oil/mutator/init.lua b/lua/oil/mutator/init.lua index 8b72a012..8dfd4b05 100644 --- a/lua/oil/mutator/init.lua +++ b/lua/oil/mutator/init.lua @@ -140,6 +140,7 @@ M.create_actions_from_diffs = function(all_diffs) else local by_id = diff_by_id[diff.id] -- HACK: set has_delete field on a list-like table of diffs + ---@diagnostic disable-next-line: inject-field by_id.has_delete = true -- Don't insert the delete. We already know that there is a delete because of the presence -- in the diff_by_id map. The list will only include the 'new' diffs. @@ -401,6 +402,7 @@ M.process_actions = function(actions, cb) local _, cross_action = util.get_adapter_for_action(action) -- Only do the conversion if the cross-adapter support is "copy" if cross_action == "copy" then + ---@diagnostic disable-next-line: assign-type-mismatch action.type = "copy" table.insert(actions, { type = "delete",