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
628 stars 31 forks source link

Stop rendering when edit big file;add a new user command to force redraw;ignore glowpreview #86

Closed PostCyberPunk closed 4 months ago

PostCyberPunk commented 8 months ago

非常棒的插件,看来你比较忙了,我尝试修复了几个问题,但是我lua写的一团糟:(,麻烦仔细 review一下

  1. 增加 choke_at_line count选项,在超过这个行数之后停止对应mod的渲染,-1的时候不限制(默认值),#85
  2. 我在写shell scipt的时候chunk不会及时更新,见下图,有时候甚至会挡住字,不好复现遮挡的情况,我也懒得查了,所以直接增加一个RedrawHL指令强制重新渲染一下,至少不挡字了。 swappy-20240131-170012

3.忽略 glow.nvim的预览窗口

shellRaining commented 4 months ago

抱歉前几个月因为个人原因比较忙,没有时间来整理你的代码。

不过你提到的这个问题也许已经解决了,我为 chunk 添加了一个 max_file_size 选项,当文件大于 1mb 的时候自动关闭。同时,对于 bash 的支持确实不太好,因为没有针对的写他的语法树规则。

如果你还遇到了类似的 bug,请直接提出 issue,感谢你的工作(但由于主分支变化太大了,我实在没有精力合并所有的代码,实在抱歉)

shellRaining commented 4 months ago

至于你的代码的实现,我认为是没有问题的,我会合并有关 glow preview 的部分