add vim.validate on user spec

This commit is contained in:
Barrett Ruth 2025-09-12 16:30:09 -05:00
parent d336fc33f7
commit 3f49721657
13 changed files with 33 additions and 268 deletions

View file

@ -161,9 +161,8 @@ local function run_problem()
return
end
local has_lsp, lsp = pcall(require, "lsp")
if has_lsp and lsp.lsp_format then
lsp.lsp_format({ async = true })
if config.hooks and config.hooks.before_run then
config.hooks.before_run(problem_id)
end
if not vim.g.cp_contest then
@ -185,9 +184,8 @@ local function debug_problem()
return
end
local has_lsp, lsp = pcall(require, "lsp")
if has_lsp and lsp.lsp_format then
lsp.lsp_format({ async = true })
if config.hooks and config.hooks.before_debug then
config.hooks.before_debug(problem_id)
end
if not vim.g.cp_contest then
@ -246,9 +244,6 @@ function M.setup(user_config)
config = config_module.setup(user_config)
local plugin_path = get_plugin_path()
config.snippets.path = plugin_path .. "/templates/snippets"
snippets.setup(config)
if initialized then