GithubHelp home page GithubHelp logo

Comments (3)

rrthomas avatar rrthomas commented on July 28, 2024 1

One reasonable approach could be to focus on the buffers opened within the project. When we have only one buffer open, the behavior should be the same of opening a random file outside a project.

This sounds like it would make the operation of dtrt-indent at the project level non-deterministic, in the sense that its conclusion about the right settings for the project would depend on which buffers were open. I guess it should converge on the same answer as you open more and more files (so eventually it should get the same result), but this all sounds quite complicated. Simply having a correctly-set .editorconfig sounds easier.

I have to confess, this still sounds to me like something that's theoretically interesting, but I don't myself see much practical benefit.

Another idea: if someone fancies implementing it, it could be part of a project-management system like projectile, rather than part of dtrt-indent, or indeed a third-party package. I'm tempted to say that I think it's out of scope for dtrt-indent proper.

from dtrt-indent.

rrthomas avatar rrthomas commented on July 28, 2024

Nice idea! Currently project defaults might be expressed in .dir-locals.el or .editorconfig; the effort involved particularly in the latter is so low I'm not sure there's much need for dtrt-indent to be cleverer. In particular, which file or files would it look at, and how long would that take?

from dtrt-indent.

yudi-matsuzake avatar yudi-matsuzake commented on July 28, 2024

In particular, which file or files would it look at, and how long would that take?

One reasonable approach could be to focus on the buffers opened within the project. When we have only one buffer open, the behavior should be the same of opening a random file outside a project.

For each project, we could keep the histogram, and whenever a new file is opened within the project, we update the histogram and the analysis.

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.