microsoft / microsoft/vscode-cpptools

Clarify custom `clang_format_style`/`clang_format_fallbackStyle` block must be a string, or also support JSON object syntax

Open
#11,092 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment
  • OS and Version: Windows 11 22H2 (build 22621.1702)
  • VS Code Version: 1.79.1
  • C/C++ Extension Version: v1.15.14
Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. Go to the JSON settings
  2. Add the following key:
"C_Cpp.clang_format_fallbackStyle": {
    "BasedOnStyle": "Google",
    "IndentWidth": 4,
    "ColumnLimit": 100,
},
  1. The following warning appears (Incorrect type. Expected string):
    image

Expected behavior:
No warning is issued and intellisense is provided as this is a valid setting parameter.

Configuration and Logs
Attached
Other Extensions

No response

Additional context

No response

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 by locating the settings schema and handling for C_Cpp.clang_format_style and C_Cpp.clang_format_fallbackStyle. Determine whether the intended fix is to document string-only syntax or support JSON object syntax, then verify that the chosen behavior removes the warning and provides IntelliSense for the reproduced settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.