Skip to content

Function declaration's closing bracket highlighted as error #1225

Open
@andresrodco

Description

@andresrodco

When any but the last destructuring key is surrounded by quotes, the error occurs:
Screen Shot 2020-12-24 at 10 40 52

When any but the last destructuring key is NOT surrounded by quotes, the highlight is ok:
Screen Shot 2020-12-24 at 10 42 31

I've managed to research a little bit the issue and this is what I found:

  • This happens in a .js file.
  • This happens to the closing bracket of a function declaration. Doesn't matter if it's exported or not.
  • This happens only when inside that function there's a nested object destructuring statement AND any of the keys but the last one is surrounded by quotes, either single, double, or backticks (see images above).
  • The result of SyntaxAttr for that closing bracket is group: jsParensError->Error guifg=255(255) guibg=203(203), which is declared in the syntax/javascript.vim file.
  • I'm using Vim Polyglot with no additional configuration for javascript files.

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