microsoft / microsoft/vscode-cpptools

Disable/Modify class/struct attribute indentation in VCFormat

Offen
#8,402 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Feature Request Feature: Code Formatting Language Service Visual Studio
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Type: Feature Request

As the title says, there's the ability to disable access modifier indentation, but no such capability for attributes following the access modifier. The consequence is that styles like Google's where the indentation of access modifiers is 1 and the indentation of attributes following them is 2, is not possible to emulate using the VCFormat.
Please add this feature as this is a basic one to have for a formatter. You could go fancy with it in the end, but for the start just make it possible to ignore the indentation of the struct members relative to the access modifiers and so make it relative to the struct/class braces instead.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Verarbeitung von VCFormat für die Einrückung von Zugriffsmodifikatoren und Attributen oder struct-Mitgliedern zu lokalisieren. Implementiere die angeforderte Option, sodass die Einrückung von Mitgliedern relativ zu den geschweiften Klammern der Klasse oder des struct statt zum Zugriffsmodifikator erfolgen kann, und überprüfe anschließend, dass sowohl aktivierte als auch deaktivierte Einrückungsstile die erwartete Formatierung erzeugen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.