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

Auto indent in ruby doesn't play nicely with def #29672

Closed
Tyriar opened this issue Jun 27, 2017 · 1 comment
Closed

Auto indent in ruby doesn't play nicely with def #29672

Tyriar opened this issue Jun 27, 2017 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues languages-basic Basic language support issues wont-fix
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 27, 2017

  • VSCode Version: Code - Insiders 1.14.0-insider (15b579d, 2017-06-27T05:11:33.154Z)
  • OS Version: Linux x64 4.10.0-24-generic
  • Extensions:
Extension Author (truncated) Version
EditorConfig Edi 0.9.3
lorem-ipsum Tyr 1.0.0
sort-lines Tyr 1.3.0
vscode-svgviewer css 1.4.2
tslint eg2 0.15.0
git-project-manager fel 1.3.2
md-navigate jri 0.0.1
vscode-scss mrm 0.6.2
seti-icons qin 0.1.3
vim vsc 0.9.0

(1 theme extensions excluded)


#29492

Not sure if this is the extension or VS Code

image

Move up:

image

Snippet:

def self.sort(array, compare = lambda { |a, b| a <=> b })
  (0..array.length - 1).each do |i|
    (1..array.length - 1).each do |j|
    end
  end
end
@vscodebot vscodebot bot added the insiders label Jun 27, 2017
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Jun 29, 2017
@rebornix rebornix added this to the July 2017 milestone Jun 29, 2017
@rebornix rebornix modified the milestones: July 2017, Backlog Aug 3, 2017
@chrmarti chrmarti removed the insiders label Sep 27, 2017
@alexdima alexdima added the editor-autoindent Editor auto indentation issues label Oct 26, 2017
@rebornix rebornix added the languages-basic Basic language support issues label Sep 19, 2018
@rebornix
Copy link
Member

rebornix commented Nov 3, 2020

This is due to the limited architecture (regex based indentation rules), 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. 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.

@rebornix rebornix closed this as completed Nov 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2020
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 editor-autoindent Editor auto indentation issues languages-basic Basic language support issues wont-fix
Projects
None yet
Development

No branches or pull requests

4 participants