Compare commits
No commits in common. "v0.7.6" and "chore/add-issue-templates" have entirely different histories.
v0.7.6
...
chore/add-
2 changed files with 5 additions and 18 deletions
|
|
@ -205,9 +205,9 @@ Debug Builds ~
|
|||
==============================================================================
|
||||
CONFIGURATION *cp-config*
|
||||
|
||||
Configuration is done via `vim.g.cp`. Set this before using the plugin:
|
||||
Configuration is done via `vim.g.cp_config`. Set this before using the plugin:
|
||||
>lua
|
||||
vim.g.cp = {
|
||||
vim.g.cp_config = {
|
||||
languages = {
|
||||
cpp = {
|
||||
extension = 'cc',
|
||||
|
|
@ -274,7 +274,7 @@ the default; per-platform overrides can tweak 'extension' or 'commands'.
|
|||
|
||||
For example, to run CodeForces contests with Python by default:
|
||||
>lua
|
||||
vim.g.cp = {
|
||||
vim.g.cp_config = {
|
||||
platforms = {
|
||||
codeforces = {
|
||||
default_language = 'python',
|
||||
|
|
@ -285,7 +285,7 @@ For example, to run CodeForces contests with Python by default:
|
|||
Any language is supported provided the proper configuration. For example, to
|
||||
run CSES problems with Rust using the single schema:
|
||||
>lua
|
||||
vim.g.cp = {
|
||||
vim.g.cp_config = {
|
||||
languages = {
|
||||
rust = {
|
||||
extension = 'rs',
|
||||
|
|
|
|||
|
|
@ -17,11 +17,7 @@ local function ensure_initialized()
|
|||
if initialized then
|
||||
return
|
||||
end
|
||||
if vim.g.cp_config then
|
||||
vim.deprecate('vim.g.cp_config', 'vim.g.cp', 'v0.7.6', 'cp.nvim', false)
|
||||
vim.g.cp = vim.g.cp or vim.g.cp_config
|
||||
end
|
||||
local user_config = vim.g.cp or {}
|
||||
local user_config = vim.g.cp_config or {}
|
||||
local config = config_module.setup(user_config)
|
||||
config_module.set_current_config(config)
|
||||
initialized = true
|
||||
|
|
@ -38,13 +34,4 @@ function M.is_initialized()
|
|||
return initialized
|
||||
end
|
||||
|
||||
---@deprecated Use `vim.g.cp` instead
|
||||
function M.setup(user_config)
|
||||
vim.deprecate('require("cp").setup()', 'vim.g.cp', 'v0.1.0', 'cp.nvim', false)
|
||||
|
||||
if user_config then
|
||||
vim.g.cp = vim.tbl_deep_extend('force', vim.g.cp or {}, user_config)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue