typescript-formatter icon indicating copy to clipboard operation
typescript-formatter copied to clipboard

support vscode's editor.tabSize / editor.insertSpaces?

Open scamden opened this issue 6 years ago • 4 comments

Would be really nice to be able to control indent formatting with these two options. It seems the current options supported are only "typescript.format.etc"

scamden avatar Nov 10 '17 01:11 scamden

What is the your expected behavior? editor.tabSizetabSize ? editor.insertSpacesconvertTabsToSpaces ?

tabSize is exists in ts.EditorSettings interface, but it is not used in tsfmt now.

vvakame avatar Nov 10 '17 16:11 vvakame

i believe the appropriate behavior is that editor.tabSize would be tabSize normally but if editor.insertSpaces == true then editor.tabSize would indicate indentSize. would that be possible?

scamden avatar Nov 10 '17 19:11 scamden

when convertTabsToSpaces: true, tab char replaced by indentSize: x at current typescript implementation. I think if you want to use "editor.insertSpaces": true, use "editor.indentSize": x.

vvakame avatar Nov 11 '17 02:11 vvakame

I️ don’t think vscode has that option (indentSize) but I️ might have missed it On Fri, Nov 10, 2017 at 6:01 PM Masahiro Wakame [email protected] wrote:

when convertTabsToSpaces: true, tab char replaced by indentSize: x at current typescript implementation. I think if you want to use "editor.insertSpaces": true, use "editor.indentSize": x.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vvakame/typescript-formatter/issues/117#issuecomment-343631958, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE5mEzwsmz_-AHE9WpZWHmNJUS48-WVks5s1QAEgaJpZM4QY7f7 .

scamden avatar Nov 11 '17 04:11 scamden