REditorSupport / REditorSupport/languageserver

Autoindent adding unneccesary indent

Open
#520 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
R
Stars
675
Forks
118
Avg merge
1d 37m
Merged PRs (30d)
11

Description

Describe the bug

If adding pipes onto the end of a command that finishes with a bracket on a newline the autoindent seems to want to add an extra indent.

To Reproduce
Steps to reproduce the behavior:

2022-02-03 09 26 36

Do you want to fix by self? (We hope your help!)

No

Expected behavior

That it doesn't indent a second time

Environment (please complete the following information):

OS: macOS
VSCode Version: 1.63.2
R Version: 4.1.2
vscode-R version: v2.3.6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence in VSCode with R 4.1.2 and vscode-R 2.3.6: add pipes after a command ending with a bracket on a newline. No source file or test is named, so trace the autoindent behavior from that reproduction; done means the continuation no longer receives a second unnecessary indent.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.