Giter Site home page Giter Site logo

Comments (4)

rrthomas avatar rrthomas commented on July 28, 2024

I agree that if editorconfig is active then dtrt-indent should defer to it, but otherwise, it should work as normal: if the user doesn't want to use editorconfig, then dtrt-indent should do its job, and also it's not really dtrt-indent's place to notify the user about editorconfig (they may neither know nor care about it).

from dtrt-indent.

rrthomas avatar rrthomas commented on July 28, 2024

It's easy enough to detect whether editorconfig is installed and active, but how to detect whether there is a configuration for the current project? It seems to me that by dtrt-indent's philosophy, which is that it tries to guess the right thing to do, it should remain active if editorconfig is not run. It seems that editorconfig runs before the major mode hooks (it hooks into change-major-mode-after-body-hook, which runs before the major mode hooks (where dtrt-indent-mode is run), but editorconfig-apply doesn't seem to set anything to say that it has run. (I'm also not sure whether dtrt-indent should run when editorconfig-apply has run but unsuccessfully—probably not.)

from dtrt-indent.

jscheid avatar jscheid commented on July 28, 2024

but editorconfig-apply doesn't seem to set anything to say that it has run

How about if dtrt-indent-mode simply ignore any settings that already have a buffer-local override? That should make it leave alone any relevant settings applied by editorconfig and also other packages, such as prettier. I suppose it would be a fairly major change at this point but I can't see how it would hurt.

from dtrt-indent.

rrthomas avatar rrthomas commented on July 28, 2024

@jscheid That seems reasonable.

from dtrt-indent.

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.