Skip to content

Conversation

@1unarzDev
Copy link

Feature Overview

  • You may now add the field cph.general.templatePaths with the ability to add multiple templates with a label and path.
  • When opening a new problem, if you have a default language selected, the menu of templates for that given language is shown immediately. Otherwise, you must first select a language, then the corresponding menu of templates for that language is shown.
  • If the user hasn't defined any templates, they will simply get a blank file.
  • If there is only one defined template for a given language, this template will be opened automatically without input.
"cph.general.templatePaths": {
    "cpp": [
        {
            "label": "Template Name 1",
            "path": "<path-to-your-cpp-template>"
        },
        {
            "label": "Template Name 2",
            "path": "<path-to-your-cpp-template>"
        }
    ],
    "java": [
        {
            "label": "Default Java Template",
            "path": "<path-to-your-java-template>"
        }
    ]
}

I apologize if I have done anything incorrectly, this is my first time contributing to a project that I"m not heavily involved in. The main goal I had in mind was to add support for using templates in multiple languages. I am currently practicing for USACO and have been using CF heavily, but my larger, more comprehensive template that I've been using is not competition legal because prewritten code is illegal. As a result, I decided that I want to primarily use a stripped down smaller template while practicing, and use the larger template for CF competitions. All features have been fully tested, and I passed all the required tests.

…dded lint fixing script, fixed crlf linting issue, and revised user guide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant