Skip to content

thrift-labs/thrift-fmt-vscode

Repository files navigation

thrift-formatter

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