Skip to content

Inappropriate format on type for if () blocks #1671

@ThomasSoeiro

Description

@ThomasSoeiro

Describe the bug

Inappropriate format on type for if () blocks

I have no idea if it is a vscode-R, languageserver, or styler issue.

To Reproduce

  1. Enable Format On Type ("editor.formatOnType": true)
  2. In an Editor, write if (TRUE) and press return
  3. A curly brace and f( are added as follows:
if (TRUE) {
    f(

Can you fix this issue by yourself? (We appreciate the help)

No

Expected behavior

No function call (f() should be added and a closing brace should be added (so the added code is not invalid).

Environment (please complete the following information):

  • OS: Fedora Linux 41
  • VSCode Version: VSCodium 1.107.18627
  • R Version: 4.4.3
  • vscode-R version: 2.8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions