feat(doc): document default setup
This commit is contained in:
parent
f0fbb15765
commit
e5aca06955
2 changed files with 19 additions and 3 deletions
20
doc/cp.txt
20
doc/cp.txt
|
|
@ -121,9 +121,8 @@ Template Variables ~
|
|||
==============================================================================
|
||||
CONFIGURATION *cp-config*
|
||||
|
||||
cp.nvim works out of the box. No setup required.
|
||||
|
||||
Here's an example configuration with lazy.nvim: >lua
|
||||
|
||||
{
|
||||
'barrett-ruth/cp.nvim',
|
||||
cmd = 'CP',
|
||||
|
|
@ -166,6 +165,21 @@ Here's an example configuration with lazy.nvim: >lua
|
|||
}
|
||||
<
|
||||
|
||||
By default, all contests are configured to use C++ with the g++ compiler and ISO standard
|
||||
17. Python is also configured with the system executable python as a non-default option. Consult lua/cp/config.lua for
|
||||
more information.
|
||||
|
||||
For example, to run CodeForces contests with Python, only the following config
|
||||
is required:
|
||||
|
||||
{
|
||||
contests = {
|
||||
codeforces = {
|
||||
default_langauge = 'python'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*cp.Config*
|
||||
Fields: ~
|
||||
{contests} (table<string,ContestConfig>) Contest configurations.
|
||||
|
|
@ -243,7 +257,7 @@ Here's an example configuration with lazy.nvim: >lua
|
|||
function(state: cp.State)
|
||||
|
||||
Hook functions receive the cp.nvim state object (cp.State). See the state
|
||||
module documentation for available methods and fields.
|
||||
module documentation (lua/cp/state.lua) for available methods and fields.
|
||||
|
||||
Example usage in hook: >lua
|
||||
hooks = {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
---@field set_contest_id fun(contest_id: string)
|
||||
---@field get_problem_id fun(): string?
|
||||
---@field set_problem_id fun(problem_id: string)
|
||||
---@field get_active_panel fun(): string?
|
||||
---@field set_active_panel fun(): string?
|
||||
---@field get_test_cases fun(): table[]?
|
||||
---@field set_test_cases fun(test_cases: table[])
|
||||
---@field get_saved_session fun(): table?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue