microsoft / microsoft/vscode-cpptools

"Operator %" insert space affected by “C_Cpp.vcFormat.space.pointerReferenceAlignment”.

Open
#8,477 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Code Formatting Language Service Visual Studio
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Discussed in https://github.com/microsoft/vscode-cpptools/discussions/8461

Originally posted by luckeverda November 29, 2021
This is my setting
image

After auto format, the space before "operator %" is removed. But this does not happen on other operators.
image

How to make it insert space near "operator %"?

Vscode version: 1.7.0
C/C++ version: 1.61.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked discussion at github.com/microsoft/vscode-cpptools/discussions/8461 and reproduce the formatting behavior using C/C++ version 1.61.1 with C_Cpp.vcFormat.space.pointerReferenceAlignment enabled. Verify the result for an expression using "operator %"; done means auto-formatting preserves the expected space as it does for other operators.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.