Skip to content

Commit

Permalink
doc: disable some type warnings from new LuaLS release
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Oct 1, 2024
1 parent 1360be5 commit 581c729
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/oil/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lua/oil/mutator/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 581c729

Please sign in to comment.