Extensions

Clang Format

Clang Format is used to format the C++ codes. You can click Actions->Format Code or press the shortcut Ctrl+Shift+I to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted.

See also Setup Clang Format.

Path

The path to the clang-format executable, or simply clang-format if it’s in the PATH environment variable.

Style

The Clang Format style. The content here is the same as the content of a .clang-format file.

You can read Clang-Format Style Options documentation or search for other materials to learn how to write the styles.

Language Server

See also Setup Language Server.

Use Linting with Language Server

Use language server to lint errors, warnings, hints, etc.

You can hover over the squiggles to see the tooltips for the explaination of the errors/warnings.

Delay in Linting

Update linting if you haven’t been typing for delay milliseconds.

Path to LSP executable

The path to the language server program, or the name if it’s in the PATH environment variable.

Arguments for Language Server

Additional arguments for the language server program. See the documentation of the language server program you are using for more information.

For example, if you are using pyls for Python, you probably want to use python as the language server program, and use -m pyls as the arguments.

Competitive Companion

See also Setup Competitive Companion.

Open New Tabs

Open a new tab when a problem is parsed.

If this is disabled, when parsing a problem, the test cases in the current tab will be replaced by the new test cases.

Connection Port

Usually, you don’t have to modify this setting. The default port 10045 is supported by Competitive Companion, so if you are using the default port, you don’t have to add custom ports in Competitive Companion. However, in case of port conflicts, etc., you can change the port and add custom ports in Competitive Companion.

Use the time limit from Competitive Companion

Use the time limit parsed by Competitive Companion as the time limit of the corresponding tab.

Head Comments

The head comments are added at the head of the code when parsing a problem.

Content

The content of the head comments. You can use the following place holders:

Time Format

The format of the ${time} place holder in the head comments. You can read the Qt documentation for available expressions:

CF Tool

You can use CF Tool to submit your solutions to Codeforces.

To submit a solution, you have to either parse a problem by Competitive Companion from Codeforces, or manually set the problem URL of a tab in the context menu of it.

See also Setup CF Tool.

Path

The path to the cf executable file, or simply cf if it’s in the PATH environment variable.

Show toast messages for submission verdicts

Show a toast message when the verdict of a submission is determined.

A toast message is a “system notification”, which is visible outside of CP Editor.

This is useful if you want to get the verdict of the previous problem when reading/solving the next problem.

Last modified September 25, 2020: feat(docs): add Tips (#60) (946abec3)