REditorSupport / REditorSupport/vscode-R
Inappropriate format on type for `if ()` blocks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
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
- Enable Format On Type (
"editor.formatOnType": true) - In an Editor, write
if (TRUE)and press return - 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the format-on-type behavior in the vscode-R repository with the reported VS Code, R, and extension versions. Trace the format-on-type handling to determine why f( is inserted after if (TRUE); done means no function call is added and a closing brace is inserted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100