xeluxee / competitest.nvim

CompetiTest.nvim is a Neovim plugin for Competitive Programming: it can manage and check testcases, download problems and contests from online judges and much more
GNU Lesser General Public License v3.0
381 stars 15 forks source link

flexible directories are now optional use #29

Closed ayham-1 closed 11 months ago

ayham-1 commented 1 year ago

Add option to use hard-coded directories when cloning contests/problems.

By default this feature is turned on.

MuhammadSawalhy commented 1 year ago

Great! Waiting for this feature

xeluxee commented 1 year ago

I suggest the following changes:

xeluxee commented 1 year ago

As @MuhammadSawalhy pointed out, users could prefer functions to configure contest directory.

So both contests_directory and problems_directory should accept one of the following values:

I'd like to introduce a new set of modifiers, the receive-modifiers, that should be kept separated from file format modifiers and should be used to evaluate contests_directory, problems_directory and comments in template files (from #39):

modifier meaning
$(PROBLEM) Problem name, name field
$(GROUP) judge and contest name, group field
$(JUDGE) first part of group, before hyphen
$(CONTEST) second part of group, after hyphen
$(URL) problem url, url field
$(MEMLIM) available memory, memoryLimit field
$(TIMELIM) time limit, timeLimit field
$(HOME) home directory
$(DATE) current time, following date_format

Note that $(GROUP), $(JUDGE) and $(CONTEST) are different modifiers, but the latter two modifiers are generated from the former. Also $(MEMLIM), $(TIMELIM) and $(DATE) are meant to be used in template files only.

Is these enough to reach an agreement on #28? @ayham-1 @MuhammadSawalhy

MuhammadSawalhy commented 1 year ago

Seams like I need to learn Lua and get a deep dive into this PR!

xeluxee commented 11 months ago

Closing with #40 See how to customize folder structure for received problems and contests.