feat(commands): add tab completion for :CP open (#338)

## Problem

`:CP open` accepts `problem`, `contest`, and `standings` but offered no
tab completion for them.

## Solution

Add an `args[2] == 'open'` branch in the `plugin/cp.lua` completer
returning the three valid subcommands.
This commit is contained in:
Barrett Ruth 2026-03-06 16:14:58 -05:00 committed by GitHub
parent 4ef00afe66
commit 9727dccc6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,6 +112,8 @@ end, {
local candidates = { 'stop' }
vim.list_extend(candidates, platforms)
return filter_candidates(candidates)
elseif args[2] == 'open' then
return filter_candidates({ 'problem', 'contest', 'standings' })
elseif args[2] == 'next' or args[2] == 'prev' or args[2] == 'pick' then
return filter_candidates({ '--lang' })
else