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
657 stars 33 forks source link

Integrate with `render-markdown` to support padding and margin in code blocks #141

Open serhez opened 1 month ago

serhez commented 1 month ago

Is your feature request related to a problem? Please describe. The indent guides do not adapt to padding/margins for code blocks in markdown-related documents (e.g., markdown, quarto, rmd, etc.), a feature provided by the plugin render-markdown.

Describe the solution you'd like An integration with render-markdown to consider padding/margin when rendering indent guides.

Describe alternatives you've considered Not using indent guides or not using padding/margins.

Additional context Here is an example without padding:

Screenshot 2024-10-02 at 13 32 24

Here is an example with padding:

Screenshot 2024-10-02 at 13 33 13

serhez commented 1 month ago

Perhaps this feature could be more generic than just integrating with render-markdown specifically. Maybe it is possible to detect virtual text at the beginning of lines and account for it when rendering the indent guides?