kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.16k stars 37 forks source link

How to unhighlight collapsed lines #140

Closed renjinxi closed 1 year ago

renjinxi commented 1 year ago

Feature description

When there are too many collapsed lines highlighted, it will show a particularly messy

Describe the solution you'd like

Only the identifier at the end of the line is highlighted

Additional context

No response

kevinhwang91 commented 1 year ago

Can't get your point, show an example.

renjinxi commented 1 year ago

企业微信截图_16884345796383 Just like above, only the last part is highlighted

kevinhwang91 commented 1 year ago

Why the last is highlighted? The cursor is under thezipfile|.

renjinxi commented 1 year ago

Why the last is highlighted? The cursor is under thezipfile|.

image

When the code collapses, highlight only the ellipsis at the end of the collapsed line,The folding effect above is from Pycharm, I don't know how to do that in nvim-ufo

rockyzhang24 commented 1 year ago

So ugly. Highlightings only on the last parts are much like the patches on your pants. On the contrary, highlighting the whole line is quite pretty (like wearing a striped shirt, but the premise is picking a matching color) and straightforward. You could recognize which lines are folded without moving your eyeballs, especially on a long line. This requirement is too specific and bizarre, and I think you could fork the repo and tweak it by yourself.

renjinxi commented 1 year ago

So ugly. Highlightings only on the last parts are much like the patches on your pants. On the contrary, highlighting the whole line is quite pretty (like wearing a striped shirt, but the premise is picking a matching color) and straightforward. You could recognize which lines are folded without moving your eyeballs, especially on a long line. This requirement is too specific and bizarre, and I think you could fork the repo and tweak it by yourself.

You also said that highlighting entire lines is especially noticeable when you have lots of folds and split the screen, so you know how disastrous it is

renjinxi commented 1 year ago

The meaning of folding itself is to hide information, and it should not attract too much attentio

renjinxi commented 1 year ago

So ugly. Highlightings only on the last parts are much like the patches on your pants. On the contrary, highlighting the whole line is quite pretty (like wearing a striped shirt, but the premise is picking a matching color) and straightforward. You could recognize which lines are folded without moving your eyeballs, especially on a long line. This requirement is too specific and bizarre, and I think you could fork the repo and tweak it by yourself.

I don't want to argue with anyone, I just don't know how to undo this fold highlight, and I'd appreciate it if you could tell me what to do instead

rockyzhang24 commented 1 year ago

Nope. I like the style, highlighting the whole line. Noticeable appearance is essential for showing the folded line. Folding is to hide info, so we need to show the line distinctively noting that the detailed info is hidden. If merely the last part is marked, it is hard to distinguish whether some lines are folded, or unfinished code is left there.

Like I said, this requirement is too specific and subjective. The best way to meet your need is forking it and changing it based on your own taste.

rockyzhang24 commented 1 year ago
image

I have to say it is so pretty!

renjinxi commented 1 year ago

image image This is unacceptable to me, but thanks for the reply, I know what to do

kevinhwang91 commented 1 year ago
hi Folded guifg=NONE guibg=NONE
hi UfoFoldedEllipsis guibg=yellow