Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation is wrong for PHP switch() {} blocks #81107

Closed
joachim-n opened this issue Sep 18, 2019 · 2 comments
Closed

indentation is wrong for PHP switch() {} blocks #81107

joachim-n opened this issue Sep 18, 2019 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug php PHP support issues verified Verification succeeded
Milestone

Comments

@joachim-n
Copy link

Issue Type: Bug

Enter the following in a PHP document:

    switch ($foo) {
      case 1:
    }

Now place the cursor at the end of the 'case' line and press return.

Expected: indentation increases.
Actual: no indentation increase.

VS Code version: Code 1.38.1 (b37e54c, 2019-09-11T13:31:32.854Z)
OS version: Darwin x64 18.7.0

Extensions (11)
Extension Author (truncated) Version
gitlens eam 9.9.3
php-debug fel 1.13.0
php-intellisense fel 2.3.10
php-pack fel 1.0.2
auto-comment-blocks kev 1.0.1
VS-code-drupal mar 0.0.12
vscode-duplicate mrm 1.2.1
php-docblocker nei 2.0.1
rewrap stk 1.9.1
twig wha 1.0.2
change-case wma 1.0.0
@alexr00
Copy link
Member

alexr00 commented Sep 19, 2019

I can't reproduce. Can you try disabling all extensions?
image

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Sep 19, 2019
@joachim-n
Copy link
Author

I just reproduced this again.

  1. Ran code --disable-extensions

  2. Opened a new file

  3. Wrote the following:

<?php

switch ($foo) {
  case 1:
}

Pressed RETURN at the end of the colon. Result: no extra indentation.

A couple of differences with your example:

  • I have indentation set to 2 spaces
  • you're using a SCRIPT tag. Are you writing JS rather than PHP?

@alexr00 alexr00 assigned roblourens and unassigned alexr00 Sep 19, 2019
@alexr00 alexr00 added php PHP support issues and removed info-needed Issue requires more information from poster labels Sep 19, 2019
@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Oct 10, 2019
@roblourens roblourens added this to the October 2019 milestone Oct 10, 2019
@connor4312 connor4312 added the verified Verification succeeded label Oct 30, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug php PHP support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants