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

Wrong indentation after chained methods #66816

Closed
kiyutink opened this issue Jan 20, 2019 · 1 comment
Closed

Wrong indentation after chained methods #66816

kiyutink opened this issue Jan 20, 2019 · 1 comment
Assignees
Labels
editor-autoindent Editor auto indentation issues under-discussion Issue is under discussion for relevance, priority, approach

Comments

@kiyutink
Copy link

kiyutink commented Jan 20, 2019

  • VSCode Version: 1.30.2
  • OS Version: Windows 10

Steps to Reproduce:

  1. Chain methods and end it with a semicolon
  2. Press enter - the caret is indented but it shouldn't be
    gif: https://i.imgur.com/I2STjrm.gif

i2stjrm

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the editor-autoindent Editor auto indentation issues label Jan 20, 2019
@alexdima alexdima assigned rebornix and unassigned alexdima Jul 5, 2019
@rebornix rebornix added the under-discussion Issue is under discussion for relevance, priority, approach label Oct 21, 2019
@rebornix
Copy link
Member

rebornix commented Nov 3, 2020

This is due to the limited architecture (regex based indentation rules and only support limited code styles), we may want to consider using formatters if they exist for indenation adjustment (if interested, we can discuss in #19847).

For this particular issue, if the indentation rules are leading to more trouble than having no auto indent, you can set editor.autoIndent to advanced to disable the regex based indentation adjustment or use auto formatting (editor.formatOnType, editor.formatOnPaste). As we don't have an easy good-enough fix for it, we close it for now and explore better solutions through issues like (#19847, #34621 or #66235).

@rebornix rebornix closed this as completed Nov 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-autoindent Editor auto indentation issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants