refactor: remove open_url config option in favour of :CP open (#322)

## Problem

`open_url` automatically opened the browser on contest load and problem
change, which is now redundant with `:CP open`.

## Solution

Remove the `open_url` field from `cp.Config`, its default, its
validation, and the call site in `setup_contest`. Remove documentation
from `cp.nvim.txt`.
This commit is contained in:
Barrett Ruth 2026-03-05 22:55:43 -05:00 committed by GitHub
parent 401afb205e
commit 2d50f0a52a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 14 deletions

View file

@ -101,7 +101,6 @@
---@field templates? CpTemplatesConfig
---@field hooks Hooks
---@field debug boolean
---@field open_url boolean
---@field scrapers string[]
---@field filename? fun(contest: string, contest_id: string, problem_id?: string, config: cp.Config, language?: string): string
---@field ui CpUI
@ -118,7 +117,6 @@ local utils = require('cp.utils')
-- defaults per the new single schema
---@type cp.Config
M.defaults = {
open_url = false,
languages = {
cpp = {
extension = 'cc',
@ -362,7 +360,6 @@ function M.setup(user_config)
hooks = { cfg.hooks, { 'table' } },
ui = { cfg.ui, { 'table' } },
debug = { cfg.debug, { 'boolean', 'nil' }, true },
open_url = { cfg.open_url, { 'boolean', 'nil' }, true },
filename = { cfg.filename, { 'function', 'nil' }, true },
scrapers = {
cfg.scrapers,