From 9727dccc6f19c47f129f40df936726cc06a58581 Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Fri, 6 Mar 2026 16:14:58 -0500 Subject: [PATCH] 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. --- plugin/cp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/cp.lua b/plugin/cp.lua index 2baa1e3..44b9d5c 100644 --- a/plugin/cp.lua +++ b/plugin/cp.lua @@ -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