shellRaining / hlchunk.nvim

This is the lua implementation of nvim-hlchunk, you can use this neovim plugin to highlight your indent line and the current chunk (context) your cursor stayed
MIT License
614 stars 31 forks source link

Wrapped Line virtural text consistency #136

Open jas0xf opened 2 weeks ago

jas0xf commented 2 weeks ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Before: 20240919_21h04m39s_grim After: 20240919_21h14m05s_grim

this issue is discussed at https://github.com/neovim/neovim/issues/23108 and the core dev solved this via adding virt_text_repeat_linebreak flag into api.nvim_buf_set_extmark https://github.com/neovim/neovim/pull/26625

Describe the solution you'd like A clear and concise description of what you want to happen. just set virt_text_repeat_linebreak = true when calling api.nvim_buf_set_extmark ex. lua/hlchunk/mods/chunk/init.lua line 159

row_opts.virt_text_repeat_linebreak = true

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

itepechi commented 2 weeks ago

Note that virt_text_repeat_linebreak will break the rendering on the first and last line if they are softwrapped. We need some special treatment for them.