Skip to content

Commit

Permalink
feat: filter user command completion
Browse files Browse the repository at this point in the history
  • Loading branch information
tronikelis committed Jan 14, 2025
1 parent 9afbd2d commit 659598d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/conflict-marker/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ function Conflict:init()
choice()
end, {
nargs = 1,
complete = function()
return vim.tbl_keys(choice_map)
complete = function(query)
return vim.iter(vim.tbl_keys(choice_map))
:filter(function(x)
return x:sub(1, #query) == query
end)
:totable()
end,
})
end
Expand Down

0 comments on commit 659598d

Please sign in to comment.