typescript-vim icon indicating copy to clipboard operation
typescript-vim copied to clipboard

Wrong indent within function with Promise<type> return signature

Open alx13 opened this issue 8 years ago • 1 comments

Expected behaviour after indenting:

export function a() {
  const x = _.chain(1)
    .value();
  return Promise
    .resolve(x);
}

export function b(): Promise<number> {
  const x = _.chain(1)
    .value();
  return Promise
    .resolve(x);
}

Actual:

export function a() {
  const x = _.chain(1)
    .value();
  return Promise
    .resolve(x);
}

export function b(): Promise<number> {
  const x = _.chain(1)
  .value();
  return Promise
  .resolve(x);
}

alx13 avatar Jan 03 '18 14:01 alx13

Thanks. The indent is mostly copied from https://github.com/pangloss/vim-javascript, which would not recognize the return type I guess. I will take a look.

leafgarland avatar Jan 07 '18 21:01 leafgarland