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

i guess we do this already using `chunk`/`indent` but nonetheless...

Open daUnknownCoder opened this issue 1 year ago • 11 comments

if we can get this in chunk (one node) / indent (whole file) it will be great: image

so adding fold support will do good: Inspiration: https://github.com/gh-liu/fold_line.nvim

daUnknownCoder avatar Jun 22 '24 12:06 daUnknownCoder

Feels interesting, but will doing this cause serious performance issues? I'll try out the plugin you mentioned first.

shellRaining avatar Jun 22 '24 13:06 shellRaining

Feels interesting, but will doing this cause serious performance issues? I'll try out the plugin you mentioned first.

check this: gh-liu/fold_line.nvim#1

daUnknownCoder avatar Jun 22 '24 13:06 daUnknownCoder

can this display effect meet your need

IMG_20240623_203145_949.jpg

shellRaining avatar Jun 23 '24 12:06 shellRaining

can this display effect meet your need

wait, thats real cool :lmao: tho the start of line as in return got messed up but we can use the rounded_border glyph for that anyway

can we do this for the current context only tho? coz it may coz perf drops if we do this with the whole file so i guess this is going towards chunk :damn:

tho this almost looks like the plugin

daUnknownCoder avatar Jun 23 '24 14:06 daUnknownCoder

this is impl by using ibl.hook and statucol.nvim, I have write a demo like below

the first one

image

the second one

image

which one you like better

shellRaining avatar Jun 23 '24 16:06 shellRaining

  1. the first one (what happened to ur symbols in the second one tho 💀?)
  2. whats the difference?

what ~godly~ font are you using?

Add a little bit of body text Add a little bit of body text (1)

i have just edited the image but is this possible (more similarity to the plugin) tho only when the respective fold is closed

daUnknownCoder avatar Jun 23 '24 16:06 daUnknownCoder

  1. the first one (what happened to ur symbols in the second one tho 💀?)

the second one use different char and highlight

  1. whats the difference?

the first render in the max level indent line, while the second only render in the first level

what ~godly~ font are you using?

[font]
size = 12

[font.normal]
family = "JetBrainsMono NFM"
style = "Regular"

[font.bold]
family = "JetBrainsMono NFM"
style = "Bold"

[font.italic]
family = "VictorMono NFM"
style = "Italic"

i have just edited the image but is this possible (more similarity to the plugin) tho only when the respective fold is closed

no, hlchunk only set extmark, not monitor fold info... maybe you can search for other plugin

shellRaining avatar Jun 24 '24 00:06 shellRaining

no, hlchunk only set extmark, not monitor fold info... maybe you can search for other plugin

can we just add another spec for indent like chunk having chars, something like:

chars = {
        vertical_line = "│", -- or `vertical_line` to be passed as a table for multiple indent chars
        left_top = "╭",
        left_bottom = "╰",
    },

daUnknownCoder avatar Jun 24 '24 08:06 daUnknownCoder

no, under the current conditions, it is impossible to achieve the style effect of fold-line. It is necessary to inherit the indent mod and rewrite the render function.

shellRaining avatar Jun 24 '24 08:06 shellRaining

no, under the current conditions, it is impossible to achieve the style effect of fold-line. It is necessary to inherit the indent mod and rewrite the render function.

no im just asking if we can add indent start and indent end characters

daUnknownCoder avatar Jun 24 '24 08:06 daUnknownCoder

in the dev brach, you can use filter_list to define your own hook to achieve this, but this field still unstable, maybe change in future...

shellRaining avatar Jun 24 '24 08:06 shellRaining

After considering for a while, I feel that the above implementation has a significant impact on performance and is not conducive to code maintenance. temporarily close this issue, and if I have any ideas for refactoring in the future, I may reopen it.

shellRaining avatar Oct 01 '24 09:10 shellRaining