The '=' format incorrectly with certain code style when reset tabsize
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
- Click thumbs-up 👍 on this issue if you want it!
- Click confused 😕 on this issue if not having it makes VSCodeVim unusable.
The VSCodeVim team prioritizes issues based on reaction count.
Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug report
Environment:
- VSCode Version: 1.18.0
- VsCodeVim Version: 0.10.3
- OS: windows 10.0.16299.19
What happened:
Given code like this:
// tabSize = 4
function test() {
----const {
------success,
------result,
------error
----} = data;
}
Then and select the whole block and change the tab size to 2, then press equal(=) mark to re-format:
// tabSize = 2
function test() {
--const {
------success, // this line doesn't align correctly
--result,
--error
--} = data; // this line too
}
What did you expect to happen:
All lines should be 2 space indented
// tabSize = 2
function test() {
--const {
--success, // this line doesn't align correctly
--result,
--error
} = data; // this line too
}
How to reproduce it:
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
Reproduce the issue in VSCodeVim using the JavaScript destructuring block, changing tabSize from 4 to 2 and invoking the = command on the selected block. Trace the visual-mode = formatting entry point and verify that every line receives the expected two-space indentation after the tab-size change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- 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