Giter Site home page Giter Site logo

consult-flycheck about consult HOT 11 CLOSED

minad avatar minad commented on July 20, 2024
consult-flycheck

from consult.

Comments (11)

minad avatar minad commented on July 20, 2024

Yes, this would be great, combined with preview! I would be using something like this, I am sure. I added it to the wishlist for now, feel free to create a PR.

from consult.

minad avatar minad commented on July 20, 2024

@mpenet Already implemented this. This is great, I will use this from now on instead of the flycheck buffer I think!

from consult.

mpenet avatar mpenet commented on July 20, 2024

oh wow, you rock, thanks!

from consult.

minad avatar minad commented on July 20, 2024

Please test it thoroughly, that would be nice. The way I implemented this differs from the way counsel does it. If you jump back and forth between the minibuffer, the error line numbers will not be correct anymore in the minibuffer obviously, but the jumping locations will be updated. Ideally the line numbers should also be updated, but this is not so easy since it requires dynamic candidate support #10. If it turns out that the current implementation is not working so well, I can use a simpler implementation, which does not update the locations.

from consult.

purcell avatar purcell commented on July 20, 2024

Erm, this should be a separate consult-flycheck package with proper dependencies. It's not sustainable, or good practice, to dump every possible extension into consult.el.

from consult.

purcell avatar purcell commented on July 20, 2024

Like, this immediately wouldn't pass MELPA review if submitted now.

from consult.

purcell avatar purcell commented on July 20, 2024

See #53 for the fix.

from consult.

minad avatar minad commented on July 20, 2024

To be honest I am not super happy with this. There is no such "consult" with which you can jump to flycheck errors. There is no integration of components going on, consult-flycheck is just a single command relying on some internal helper functions but there is no public consult api between the two packages. I don't want to end up with too many packages. Is the problem that flycheck is a non-core component? I also integrate with selectrum here, do I also need a consult-selectrum integration package?

from consult.

purcell avatar purcell commented on July 20, 2024

I don't want to end up with too many packages.

Think of it as organisation of code in the repo. I don't think you'd end up with "too many" actual packages, because the only separate packages would be for integration with other optional packages like flycheck.

Is the problem that flycheck is a non-core component?

Yes.

I also integrate with selectrum here, do I also need a consult-selectrum integration package?

Yes, that would also be cleaner, and quite feasible, looking at the code. A consult-selectrum package would add an entry to consult-preview-mode-hook to enable/disable its advice.

Basically anywhere you call functions (or read/write vars) declared in a non-core package, you should think about how to break that out.

It's harder to write code that works like this, but the result is more idiomatic and extensible.

from consult.

minad avatar minad commented on July 20, 2024

Yes, that would also be cleaner, and quite feasible, looking at the code. A consult-selectrum package would add an entry to consult-preview-mode-hook to enable/disable its advice.

Well, I already took care that the code is reasonably robust. As I said, the preview part is the most fragile part.

Regarding the split I am probably rather doing the all or nothing thing. Splitting up everything cleanly or not doing the split at all.

But there is also the usability problem - people are already complaining they needed selectrum, consult, embark, marginalia and orderless for example. Now if we tell them well you also need the N^2 integration libraries...

from consult.

purcell avatar purcell commented on July 20, 2024

But there is also the usability problem - people are already complaining they needed selectrum, consult, embark, marginalia and orderless for example. Now if we tell them well you also need the N^2 integration libraries...

I think that's pretty trivial tbh. The integration packages are listed next to each other, and I don't think it's as bad as N^2 in practice.

from consult.

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.