Comments (4)
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.
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.
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.
Okay ty for your answer :)
from consult-lsp.
Related Issues (20)
- consult-async-default-split is deprecated HOT 3
- TODO: Add marginalia support to diagnostic and global-symbols
- TODO: Add annotate functions for global-symbols and diagnostics
- TODO: Add customize functions for the UI
- Why consult-lsp-marginalia? HOT 7
- Preview overlays stick around when quitting from consult-lsp-diagnostics HOT 2
- Diagnostics are randomly sorted by severity HOT 10
- consult-lsp-file-symbols not grouping by symbol kind HOT 6
- consult-lsp-symbols is slow HOT 1
- How large is the minibuffer window by default? HOT 5
- consult-lsp-file-symbols duplicate with consult-imenu HOT 1
- Change `state` functions to deal with breaking change HOT 1
- Is there a way to filter the results? HOT 4
- no modes enabled when a file is previewed upon calling `consult-lsp-diagnostics` HOT 4
- consult-lsp--file-symbols-candidates: No symbols HOT 6
- Error when invoke consult-lsp-file-symbol HOT 3
- "consult--position-marker" has renamed HOT 1
- consult--tofu-encode error when invoking consult-lsp-file-symbols HOT 1
- Slowness when using for Clojure HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consult-lsp.