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
627
stars
31
forks
source link
fix: fix rendering issues that occur when 'shiftwidth' == 0 #53
Some users (or plugins) set 'shiftwidth' to 0 to make (n)vim fall back to 'tabstop'. Since this plugin currently doesn't read 'tabstop', a 'shiftwidth' value of 0 will cause wrong placement of extmarks.
This PR doesn't include fixes for rendering errors caused by 'vartabstop' because virtually no one uses it. Even core plugins like nvim-treesitter don't care about it.
Some users (or plugins) set 'shiftwidth' to 0 to make (n)vim fall back to 'tabstop'. Since this plugin currently doesn't read 'tabstop', a 'shiftwidth' value of 0 will cause wrong placement of extmarks.
This PR replaces
vim.o.shiftwidth
with [vim.fn.shiftwidth()
](https://neovim.io/doc/user/builtin.html#shiftwidth()) to handle such cases.This PR doesn't include fixes for rendering errors caused by 'vartabstop' because virtually no one uses it. Even core plugins like nvim-treesitter don't care about it.