Code Monkey home page Code Monkey logo

Comments (4)

gagbo avatar gagbo commented on August 27, 2024 2

I think it's actually not easy to do:

I learned that I should not do the preprocessing myself (i.e. stripping newlines and replacing them with spaces), but even then, the minibuffer completion doesn't look like it really likes to have multi-line completions.

The packages that usually handle this specific issue ("how to render candidates that span multiple lines ?") are the "Completion UI" ones, so directly vertico,selectrum,ivy,helm etc.

Currently, as far as I understand:

  • selectrum replaces newlines with the raw escape sequence \n with a different face (and ends up truncating the message and showing the line count)
  • vertico replaces newlines with a unicode char by default as well.

I think there are currently no solution to that issue, as both seems to have given up; otherwise I assume there would be some form of max-candidates-lines variable to be able to show 3/4 line candidates or something.

So the workarounds that I know around that would be either to:

  • use lsp-treemacs, it uses a treemacs buffer to display the error list, so there are no single-line constraint and everything should be displayed, or
  • look around helm. It's admittedly a much bigger change in the package stack, and I'm really not sure it would solve anything (checking helm-lsp would probably help); but as far as I remember, helm also uses its own buffer, so maybe completion interface limitations don't apply either.

I'll probably need to talk a little bit with minad to confirm this, but that's what I understand right now

from consult-lsp.

gagbo avatar gagbo commented on August 27, 2024 1

Closing this as I lost a bit of context and I don't expect to have time soon to somehow make this configurable.

from consult-lsp.

gagbo avatar gagbo commented on August 27, 2024

It's not something that I made available because I wasn't sure that displaying multi-line diagnostics was possible in minibuffer completion, and I didn't have time to look into that. That's why I always replace newlines in diagnostics. I know that Rust errors can be quite long, that's also kind of a pain point for me, but I'll need to go deeper into consult and minibuffer completion to see what's possible

from consult-lsp.

bkchr avatar bkchr commented on August 27, 2024

Okay ty for your answer :)

from consult-lsp.

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.