Skip to content

Class method with Implicit Return and String Literal Kills Formatting #1233

Open
@redreceipt

Description

@redreceipt

Tried to get this down as small as I could and show the problem although I'm not sure which part exactly is the issue. It ruins the rest of the file by turning everything "string" color. If the implicit return is on the same line, it works fine.

Requisite minimal reproducible example, formatted as plain text :

class Mapper {
  mapFn = () => 
    this.map((id) => `Id eq ${id}`).map((str) => str);
}

Screen Shot 2021-04-20 at 9 43 43 AM

Kapture 2021-04-20 at 09 37 51


Optional: concerning jsx.

PLEASE PLEASE PLEASE make sure you have properly
setup and are sourcing this plugin https://github.com/mxw/vim-jsx

WE DO NOT support JSX automatically, you need another plugin to add get this
functionality.

Make sure the bug still exists if you disable all other javascript plugins
except the one noted above, mxw/vim-jsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions