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

[ruby] Add indentationRules #10307

Closed
factormystic opened this issue Aug 8, 2016 · 5 comments
Closed

[ruby] Add indentationRules #10307

factormystic opened this issue Aug 8, 2016 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality languages-basic Basic language support issues
Milestone

Comments

@factormystic
Copy link

  • VSCode Version: 1.4.0
  • OS Version: Windows 10 v1511 b10586.494

Steps to Reproduce:

  1. Open a ruby file
  2. Define a new method at normal indent level (eg, type def whatever
  3. Press enter to start a new line at the method body indent level
  4. Type end to end the method block

I expected the text end to be auto-de-indented 1 level, so it matches def whatever. What actually happened is nothing at all.

That's the request. The question is, is this expected to be core behavior, or something I need an extension for since it's language specific?

@factormystic
Copy link
Author

FYI this is real annoying when combined with #10197. I basically have to hit backspace n times instead of 0 times (this issue) or 1 times (related issue, if pre-indent whitespace was selectable.

@aeschli
Copy link
Contributor

aeschli commented Aug 9, 2016

As auto indenting in ruby is a bit more tricky that needs to be done in code, using
indentationRules in the LanguageConfiguration.
See https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.d.ts#L2530.

I see that the vscode-ruby does it.
Have you tried that?

I'm happy to take a pull request if you want that in the default-ruby plugin.

@aeschli aeschli added languages-basic Basic language support issues feature-request Request for new features or functionality labels Aug 9, 2016
@aeschli aeschli added this to the Backlog milestone Aug 9, 2016
@aeschli aeschli changed the title Request/Question: Auto de-indent when typing end (ruby) [ruby] Add indentationRules Aug 9, 2016
@factormystic
Copy link
Author

I do have that ruby extension installed. I also uninstalled it to confirm it wasn't an extension problem.

@pharmmd-rich
Copy link

+1

Any luck with this? Makes it rather annoying to use VS Code for Ruby or Rails projects. Please fix end!

@rebornix
Copy link
Member

Dup of #2272 . Let's track it there. This sprint we'll at least indent end correctly when you press enter.

@rebornix rebornix added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 13, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality languages-basic Basic language support issues
Projects
None yet
Development

No branches or pull requests

4 participants