Code Monkey home page Code Monkey logo

Comments (7)

jonas-jonas avatar jonas-jonas commented on July 23, 2024

#2 Related

from dartboard.

jonas-jonas avatar jonas-jonas commented on July 23, 2024
  • Set indentation (at first plugin start, for dart files)

from dartboard.

jonas-jonas avatar jonas-jonas commented on July 23, 2024

Currently it doesn't seem to be possible to set these settings per editor/contentType. It would be nice to have this set for only the Dart contentType as the formatter is quite inflexible. See dart-lang/sdk#37451

from dartboard.

jonas-jonas avatar jonas-jonas commented on July 23, 2024

@mickaelistria

Do you know if it's possible to set the indentation settings (for example TabWidth), and related settings, on a per contentType basis?

For us it would be nice to set these settings for only Dart files as the Dart formatter is very opinionated and forces 2-space indentation on every file. Thus it would be nice to just set these settings for all Dart files.

from dartboard.

mickaelistria avatar mickaelistria commented on July 23, 2024

Do you know if it's possible to set the indentation settings (for example TabWidth), and related settings, on a per contentType basis?

I don't think it's possible right now. But there are things in Platform that might allow to implement it efficiently. This could for example be a new PreferenceScope for a given content-type, and then this Scope could be added to other scopes used by editors. In any case, it seems more like work to do in Platform first.

from dartboard.

jonas-jonas avatar jonas-jonas commented on July 23, 2024

I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=549447 for this.

from dartboard.

jonas-jonas avatar jonas-jonas commented on July 23, 2024

As this "feature" in the platform will likely not be addressed in the near future, I think we should show a Dialog on first access of preferences (which translates to creating or importing a new project or opening a Dart file) indicating, what the current situation is. The dialog should also give an option for the user to select if he wants to update the global settings for indentation or not.

I feel like this is a major usability issue (having the formatter & IDE not working together properly). So I will see if I find the time to work on this in the platform in the next month.

It might also be something for @lak-proddev to work on?

from dartboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.