Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Format should respect spaces-for-tabs, editor-tab-width, and Document newline character #998

Closed
gavinking opened this issue Jun 26, 2014 · 7 comments

Comments

@gavinking
Copy link
Contributor

@lucaswerkmeister See com.redhat.ceylon.eclipse.util.Indents which will give you all the things you need.

@lucaswerkmeister
Copy link

All of these are already available in FormattingOptions (indentMode, lineBreak), so this is a special case of “setting formatting options from the IDE” (#987). (Although it won’t be in that dialogue.)

@gavinking
Copy link
Contributor Author

Right, what I mean is that this needs to happen transparently w/o the user doing anything explicit to the formatter. So it's a little distinct from "configuration".

@lucaswerkmeister
Copy link

Clarification: What would I do with editor-tab-width? If I indent with tabs, it doesn’t matter – if I indent with spaces, do I use that to determine with how many spaces to indent?

@gavinking
Copy link
Contributor Author

do I use that to determine with how many spaces to indent?

Yes.

@lucaswerkmeister lucaswerkmeister self-assigned this Jun 28, 2014
@lucaswerkmeister lucaswerkmeister added this to the Ceylon 1.1 milestone Jun 28, 2014
@lucaswerkmeister
Copy link

It appears IDocumentExtension4.getDefaultLineDelimiter() (used by Indents, but I’m using it directly so I can tell OS default and explicit \n apart) returns whatever the document currently uses, not what the project’s resource settings specify. Is that okay?

@gavinking
Copy link
Contributor Author

Yes, that's right.

Sent from my iPhone

On 28 Jun 2014, at 3:04 pm, Lucas Werkmeister notifications@github.com wrote:

It appears IDocumentExtension4.getDefaultLineDelimiter() (used by Indents, but I’m using it directly so I can tell OS default and explicit \n apart) returns whatever the document currently uses, not what the project’s resource settings specify. Is that okay?


Reply to this email directly or view it on GitHub.

@lucaswerkmeister
Copy link

Great, then I’m ready to push.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants