trouble.nvim icon indicating copy to clipboard operation
trouble.nvim copied to clipboard

Wrap text in Trouble Diagnostics?

Open LandonSchropp opened this issue 2 years ago • 6 comments

Apologies if this is a dumb question, but I couldn't find a good answer while searching.

Is it possible to wrap the text in the trouble diagnostics?

Here's an example where wrapping the text would make things much easier to read without having to scroll.

Screen Shot 2021-11-14 at 5 39 04 PM

Thanks!

LandonSchropp avatar Nov 14 '21 23:11 LandonSchropp

It's just vim buffer so you can do :set wrap. It doesn't look pretty though.

pbogut avatar Nov 17 '21 22:11 pbogut

It seems like Trouble disables this option by default. Is there a way to override this? Thanks!

LandonSchropp avatar Nov 23 '21 05:11 LandonSchropp

You can press "K" (shift-k) to see a popup with the full text

folke avatar Dec 10 '21 09:12 folke

I think this can be achieved using autocmd. Since the file name is Trouble I tried the following but didn't work:

au BufRead,BufNewFile Trouble setlocal wrap linebreak	" Line wrap in Trouble files

If anyone has an idea on how to make it work, please, let me know!

Balrrach avatar Oct 25 '22 13:10 Balrrach

I would love to have as an option that Trouble buffers always wrap text

carlesandres avatar Jan 12 '23 13:01 carlesandres

I've opened a PR to add this feature here

roobert avatar Aug 13 '23 12:08 roobert

Development on the main branch is EOL.

Trouble has been rewritten and will be merged in main soon.

This issue/feature either no longer exists or has been implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

folke avatar Mar 29 '24 07:03 folke