question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support a customisable formatter (custom indent settings, maybe .editorconfig?)

See original GitHub issue

by my resolution I need to increase the tabsize from 2 to 4 spaces but it does not work

User settings: "[dart]":{ "editor.tabSize": 4, "editor.insertSpaces": true, "editor.detectIndentation": false, }

when formatting the document, always use 2 spaces.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:419
  • Comments:143 (42 by maintainers)

github_iconTop GitHub Comments

107reactions
DanTupcommented, May 18, 2018

I’m afraid this is by design. The formatter that Dart Code uses is the official one (https://github.com/dart-lang/dart_style) and it does not support changing indenting; it always uses 2 spaces.

I’d love to have an alternative formatter, as I’m not a big fan of dart_style’s opinions, but it’s way down the list of priorities at this time.

I’m gonna keep this issue open and move to the backlog, as I think having a flexible formatter (such as based on editorconfig) is a reasonable request.

75reactions
tabinnorwaycommented, Sep 21, 2018

Any idea if this is going to be worked on? I mean, it’s not 1989. I have two big-arse monitors, and it’s a little weird to have some Dart plugin developer tell me that all my Dart code needs to fit within the leftmost 1/6th of my editor space.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Index of EditorConfig properties - ReSharper - JetBrains
This page lists custom ReSharper EditorConfig properties that you can use to configure code formatting rules, code inspection severity ...
Read more >
How can I customize the tab-to-space conversion factor?
By default, Visual Studio Code will try to guess your indentation options depending on the file you open. You can turn off indentation...
Read more >
457046 – Support .editorconfig (editorconfig.org) - Bugs
Hi, I'm studying the capability to support .editorconfig inside Eclipse IDE by ... an .editorconfig file, attach a change listener that applies formatting....
Read more >
Adjust indents and spacing in Word - Microsoft Support
Change paragraph indents and spacing. Select one or more paragraphs that you want to adjust. Go to Home and then select the Paragraph...
Read more >
editorconfig c - You.com | The Search Engine You Control
Both Visual Studio and Visual Studio Code have built-in EditorConfig support for each of the global Visual Studio C++ formatting settings, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found