Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Thrift FormatterNew to Visual Studio Code? Get it now.
Thrift Formatter

Thrift Formatter

alingse

|
3,549 installs
| (0) | Free
Thrift file formatter, keeping and align comment
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

thrift-formatter README

A Thrift file formatter extention

use https://github.com/thrift-labs/thrift-fmt-ts

(a typescript implement of https://github.com/thrift-labs/thrift-fmt )

unfortunately, it was created with a typo extension name "thirft-formater"

Features

  1. keeping the comments
  2. align the tail comment of struct/enum
  3. align by field's each part in struct/enum/union/exception
  4. or align by field's assgin part in struct/enum/union/exception
  5. patch the missed list separator
  6. pathc the missed 'required' in field

Requirements

Extension Settings

  1. thriftFormatter.patchRequired boolean, default true

if true will patch the miss required for field in struct or others.

  1. thriftFormatter.patchSeparator boolean, default true

if true will patch the miss , for field in struct or others, will remove the , at function tail in service

  1. thriftFormatter.indent number, default 4

the space indent for field in struct or enum and function in service.

  1. thriftFormatter.alignByAssign boolean, default false

if true, will align by field's assgin ('=') part, support field in struct or others.

  1. thriftFormatter.assignAlign boolean, default false

if true, will align by field's each part, support field in struct or others.

if true, will ingore the alignByAssign option

Known Issues

see #issues

Release Notes

see CHANGELOG.md and vscode Page

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft